hideAll = function () {
	
	$('#geneDetailDiv').hide();
	$('#genePCRDiv').hide();
	$('#genePCR001026CDiv').hide();
	$('#genePCR001026DDiv').hide();
	$('#genePCR002027CDiv').hide();
	$('#genePCR002027DDiv').hide();
	
	$('#geneAMPDiv').hide();
	$('#geneAMPCDiv').hide();
	$('#geneAMPDDiv').hide();
	$('#geneAMP001026CDiv').hide();
	$('#geneAMP001026DDiv').hide();
	$('#geneAMP002027CDiv').hide();
	$('#geneAMP002027DDiv').hide();
	$('#geneSecondStagePCRCDiv').hide();
	$('#geneSecondStagePCRDDiv').hide();
	
	$('#colonyPCRADiv').hide();
	$('#minipreADiv').hide();
	$('#quickchangeBDiv').hide();
	$('#colonyPCRBDiv').hide();
	$('#minipreBDiv').hide();
	$('#ts559BDiv').hide();
	$('#geneRespottedDiv').hide();
	$('#genePrepIntermediatesBDiv').hide();
	$('#genePlate6MPBDiv').hide();
	$('#genePrepFinalsBDiv').hide();
	$('#geneWPCRFinalsBDiv').hide();
	$('#quickchangeCDiv').hide();
	$('#colonyPCRCDiv').hide();
	$('#minipreCDiv').hide();
	$('#ts559CDiv').hide();
	$('#geneRespottedCDiv').hide();
	$('#genePrepIntermediatesCDiv').hide();
	$('#genePlate6MPCDiv').hide();
	$('#genePrepFinalsCDiv').hide();
	$('#geneAmpliconPCRCDiv').hide();
	$('#quickchangeDDiv').hide();
	$('#colonyPCRDDiv').hide();
	$('#minipreDDiv').hide();
	$('#ts559DDiv').hide();
	$('#geneRespottedDDiv').hide();
	$('#genePrepIntermediatesDDiv').hide();
	$('#genePlate6MPDDiv').hide();
	$('#genePrepFinalsDDiv').hide();
	$('#geneAmpliconPCRDDiv').hide();
	
};

viewGeneDetail = function(){
	//View Gene Details
	hideAll();
    $.ajax({
        url: 'genedetails.action',
        type: 'POST',
        dataType: 'html',
        data :{geneName:$("#genedetails_geneName").val()},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene detail...');
        },
        success: function(data){
            $('#geneDetailDiv').show();
			$('#geneDetailDiv').html(data);	       
        }
    }); 
};

viewAPlasmid = function() {
	hideAll();
	var pcr = "001002";
	var ampfType = "001002";
	
	var step = 'A';
	
	$.ajax({
        url: 'viewGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	pcrType:pcr,
        	stepType: step
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene pcr info...');
        },
        success: function(data){
            $('#genePCRDiv').show();
			 $('#genePCRDiv').html(data);	       
        }
    });
    
    //View Gene AMP
	
    $.ajax({
        url: 'viewGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	ampfType: ampfType,
        	stepType: step
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene amp info...');
        },
        success: function(data){
            $('#geneAMPDiv').show();
			$('#geneAMPDiv').html(data);	       
        }
    });
    
    //View Colony A
    var typeA = "A";
    $.ajax({
        url: 'viewGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeA
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene colony a info...');
        },
        success: function(data){
            $('#colonyPCRADiv').show();
			$('#colonyPCRADiv').html(data);	       
        }
    }); 
    
    //View Miniprep A
    $.ajax({
        url: 'viewGeneMinipre.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeA
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading miniprep a info...');
        },
        success: function(data){
            $('#minipreADiv').show();
			$('#minipreADiv').html(data);	       
        }
    });
    
};

viewBPlasmid = function () {
	//View Quick Change B
	hideAll();
	
    var typeB = "B";
    $.ajax({
        url: 'viewGeneQuickChange.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading quick change b info...');
        },
        success: function(data){
            $('#quickchangeBDiv').show();
			$('#quickchangeBDiv').html(data);	       
        }
    });
    
    //View Colony B
    $.ajax({
        url: 'viewGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene colony b info...');
        },
        success: function(data){
            $('#colonyPCRBDiv').show();
			$('#colonyPCRBDiv').html(data);	       
        }
    });
    
    //View Miniprep B
    $.ajax({
        url: 'viewGeneMinipre.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading miniprep b info...');
        },
        success: function(data){
            $('#minipreBDiv').show();
			$('#minipreBDiv').html(data);	       
        }
    });
    
  //View B to TS559
    $.ajax({
        url: 'viewGeneTS559.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading b to ts559 info...');
        },
        success: function(data){
            $('#ts559BDiv').show();
			$('#ts559BDiv').html(data);	       
        }
    });
    
    //View Respotted B
    $.ajax({
        url: 'viewGeneRespotted.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading respotted b info...');
        },
        success: function(data){
            $('#geneRespottedDiv').show();
			$('#geneRespottedDiv').html(data);	       
        }
    });
    
    //View Prep from Intermediates B
    $.ajax({
        url: 'viewGenePrepIntermediates.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading prep from intemediates b info...');
        },
        success: function(data){
            $('#genePrepIntermediatesBDiv').show();
			$('#genePrepIntermediatesBDiv').html(data);	       
        }
    });
    
    //View Plate to 6MP B
    $.ajax({
        url: 'viewGenePlate6MP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading palte to 6mp b info...');
        },
        success: function(data){
            $('#genePlate6MPBDiv').show();
			$('#genePlate6MPBDiv').html(data);	       
        }
    });
    
    //View Prep from Finals B
    $.ajax({
        url: 'viewGenePrepFinals.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeB
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading prep from finals b info...');
        },
        success: function(data){
            $('#genePrepFinalsBDiv').show();
			$('#genePrepFinalsBDiv').html(data);	       
        }
    });
    
    //View W PCR 
    $.ajax({
        url: 'viewGeneWPCRFinals.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading w pcr info...');
        },
        success: function(data){
            $('#geneWPCRFinalsBDiv').show();
			$('#geneWPCRFinalsBDiv').html(data);	       
        }
    });
};

viewCPlasmid = function () {
	//View Quick Change C
	hideAll();
	
    var typeC = "C";
	var pcr = "001026";
	
	$.ajax({
        url: 'viewGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	pcrType:pcr,
        	stepType: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene pcr info...');
        },
        success: function(data){
            $('#genePCR001026CDiv').show();
			$('#genePCR001026CDiv').html(data);	       
        }
    });
	
	//AMP 001026 C
	$.ajax({
        url: 'viewGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	ampType:"001026",
        	stepType: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene pcr info...');
        },
        success: function(data){
            $('#geneAMP001026CDiv').show();
			$('#geneAMP001026CDiv').html(data);	       
        }
    });
    
	var pcr = "002027";
	
	$.ajax({
        url: 'viewGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	pcrType:pcr,
        	stepType: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading amplicon purification info...');
        },
        success: function(data){
            $('#genePCR002027CDiv').show();
			$('#genePCR002027CDiv').html(data);	       
        }
    }); 
	
	//AMP 002027 C
	$.ajax({
        url: 'viewGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	ampType:"002027",
        	stepType: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading amplicon purification...');
        },
        success: function(data){
            $('#geneAMP002027CDiv').show();
			$('#geneAMP002027CDiv').html(data);	       
        }
    });
	
	//Second Stage PCR C
	$.ajax({
        url: 'viewGeneSecondStagePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	stepType: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading second stage pcr...');
        },
        success: function(data){
            $('#geneSecondStagePCRCDiv').show();
			$('#geneSecondStagePCRCDiv').html(data);	       
        }
    });
	
	//AMP and LLC
	$.ajax({
        url: 'viewGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	stepType: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene amp info...');
        },
        success: function(data){
            $('#geneAMPCDiv').show();
			$('#geneAMPCDiv').html(data);	       
        }
    });
	
	
    //View Colony C
    $.ajax({
        url: 'viewGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading colony c info...');
        },
        success: function(data){
            $('#colonyPCRCDiv').show();
			$('#colonyPCRCDiv').html(data);	       
        }
    });
    
    //View Miniprep C

    $.ajax({
        url: 'viewGeneMinipre.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene miniprep c info...');
        },
        success: function(data){
            $('#minipreCDiv').show();
			$('#minipreCDiv').html(data);	       
        }
    }); 
    
  //View TS559 C
    $.ajax({
        url: 'viewGeneTS559.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene ts559 c info...');
        },
        success: function(data){
            $('#ts559CDiv').show();
			$('#ts559CDiv').html(data);	       
        }
    });
    
    //View Respotted C
    $.ajax({
        url: 'viewGeneRespotted.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene respotted c info...');
        },
        success: function(data){
            $('#geneRespottedCDiv').show();
			$('#geneRespottedCDiv').html(data);	       
        }
    });
    
    //View Prep from Intermediate C
    $.ajax({
        url: 'viewGenePrepIntermediates.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading prep from intermediate c info...');
        },
        success: function(data){
            $('#genePrepIntermediatesCDiv').show();
			$('#genePrepIntermediatesCDiv').html(data);	       
        }
    });
    
    //View Plate to 6MP C
    $.ajax({
        url: 'viewGenePlate6MP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene plate 6mp c info...');
        },
        success: function(data){
            $('#genePlate6MPCDiv').show();
			$('#genePlate6MPCDiv').html(data);	       
        }
    });
    
    //View Prep from finals C
    $.ajax({
        url: 'viewGenePrepFinals.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading prep from finals c info...');
        },
        success: function(data){
            $('#genePrepFinalsCDiv').show();
			$('#genePrepFinalsCDiv').html(data);	       
        }
    });
    
    //View Amplicon PCR
    $.ajax({
        url: 'viewGeneAmpliconPCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeC
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene amplicon pcr c info...');
        },
        success: function(data){
            $('#geneAmpliconPCRCDiv').show();
			$('#geneAmpliconPCRCDiv').html(data);	       
        }
    });
};

viewDPlasmid = function () {
	//View Quick Change D
	
	hideAll();
	
    var typeD = "D";
	var pcr = "001028";
	$.ajax({
        url: 'viewGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	pcrType:pcr,
        	stepType: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene pcr info...');
        },
        success: function(data){
            $('#genePCR001026DDiv').show();
			$('#genePCR001026DDiv').html(data);	       
        }
    }); 
	
	//AMP 001028 D
	$.ajax({
        url: 'viewGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	ampType:"001028",
        	stepType: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene pcr info...');
        },
        success: function(data){
            $('#geneAMP001026DDiv').show();
			$('#geneAMP001026DDiv').html(data);	       
        }
    });
    
	var pcr = "002029";
	$.ajax({
        url: 'viewGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	pcrType:pcr,
        	stepType: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene pcr info...');
        },
        success: function(data){
            $('#genePCR002027DDiv').show();
			$('#genePCR002027DDiv').html(data);	       
        }
    });
	
	//AMP 002029 D
	$.ajax({
        url: 'viewGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	ampType:"002029",
        	stepType: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading amplicon purification...');
        },
        success: function(data){
            $('#geneAMP002027DDiv').show();
			$('#geneAMP002027DDiv').html(data);	       
        }
    });
	
	//Second Stage PCR D
	$.ajax({
        url: 'viewGeneSecondStagePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	stepType: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading second stage pcr...');
        },
        success: function(data){
            $('#geneSecondStagePCRDDiv').show();
			$('#geneSecondStagePCRDDiv').html(data);	       
        }
    });
	
	//AMP and LLC - D
 	$.ajax({
        url: 'viewGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	stepType: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene amp info...');
        },
        success: function(data){
            $('#geneAMPDDiv').show();
			$('#geneAMPDDiv').html(data);	       
        }
    });

    //View Colony D
    $.ajax({
        url: 'viewGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading colony d info...');
        },
        success: function(data){
            $('#colonyPCRDDiv').show();
			$('#colonyPCRDDiv').html(data);	       
        }
    });
    
    //View Miniprep D
    $.ajax({
        url: 'viewGeneMinipre.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when laoding gene miniprep d info...');
        },
        success: function(data){
            $('#minipreDDiv').show();
			$('#minipreDDiv').html(data);	       
        }
    });
    
    $.ajax({
        url: 'viewGeneTS559.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene ts559 d info...');
        },
        success: function(data){
            $('#ts559DDiv').show();
			$('#ts559DDiv').html(data);	       
        }
    });
    
    //View Respotted D
    $.ajax({
        url: 'viewGeneRespotted.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene respotted d info...');
        },
        success: function(data){
            $('#geneRespottedDDiv').show();
			$('#geneRespottedDDiv').html(data);	       
        }
    });
    
    //View prep from intermeidate D
    $.ajax({
        url: 'viewGenePrepIntermediates.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene prep intermediates d info...');
        },
        success: function(data){
            $('#genePrepIntermediatesDDiv').show();
			$('#genePrepIntermediatesDDiv').html(data);	       
        }
    });
    
    //View Plate to 6MP D
    $.ajax({
        url: 'viewGenePlate6MP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when laoding gene plate 6mp d info...');
        },
        success: function(data){
            $('#genePlate6MPDDiv').show();
			$('#genePlate6MPDDiv').html(data);	       
        }
    });
    
    //View Prep from Finals D
    $.ajax({
        url: 'viewGenePrepFinals.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading prep from finals d info...');
        },
        success: function(data){
            $('#genePrepFinalsDDiv').show();
			$('#genePrepFinalsDDiv').html(data);	       
        }
    }); 
    
    //View AMP PCR D
    $.ajax({
        url: 'viewGeneAmpliconPCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#genedetails_geneName").val(),
        	type: typeD
        	},
        timeout: 20000,
        error: function(){
            alert('Timeout when loading gene amplicon pcr d info...');
        },
        success: function(data){
            $('#geneAmpliconPCRDDiv').show();
			$('#geneAmpliconPCRDDiv').html(data);	       
        }
    });
};



searchHistory = function() {
	$('#geneDetailsHistoryDiv').hide();
	$('#genePCRHistoryDiv').hide();
	$('#geneAMPHistoryDiv').hide();
	
	$('#colonyPCRAHistoryDiv').hide();
	$('#minipreAHistoryDiv').hide();
	$('#quickchangeBHistoryDiv').hide();
	
	$('#colonyPCRBHistoryDiv').hide();
	$('#minipreBHistoryDiv').hide();
	$('#genePCRHistoryC1Div').hide();
	$('#genePCRHistoryC2Div').hide();
	$('#genePCRHistoryD1Div').hide();
	$('#genePCRHistoryD2Div').hide();
	
	$('#geneAMPHistoryC1Div').hide();
	$('#geneAMPHistoryC2Div').hide();
	$('#geneAMPHistoryD1Div').hide();
	$('#geneAMPHistoryD2Div').hide();
	
	$('#geneAMPHistoryCDiv').hide();
	$('#geneAMPHistoryDDiv').hide();
	
	$('#colonyPCRCHistoryDiv').hide();
	$('#minipreCHistoryDiv').hide();
	//
	$('#colonyPCRDHistoryDiv').hide();
	$('#minipreDHistoryDiv').hide();
	$('#ts559BHistoryDiv').hide();
	
	$('#geneRespottedHistoryDiv').hide();
	$('#genePrepIntermediatesBHistoryDiv').hide();
	$('#genePlate6MPBHistoryDiv').hide();
	
	$('#genePrepFinalsBHistoryDiv').hide();
	$('#geneWPCRFinalsBHistoryDiv').hide();
	$('#ts559CHistoryDiv').hide();
	
	$('#geneRespottedCHistoryDiv').hide();
	$('#genePrepIntermediatesCHistoryDiv').hide();
	$('#genePlate6MPCHistoryDiv').hide();
	
	$('#genePrepFinalsCHistoryDiv').hide();
	$('#geneAmpliconPCRCHistoryDiv').hide();
	$('#ts559DHistoryDiv').hide();
	
	$('#geneRespottedDHistoryDiv').hide();
	$('#genePrepIntermediatesDHistoryDiv').hide();
	$('#genePlate6MPDHistoryDiv').hide();
	
	$('#genePrepFinalsDHistoryDiv').hide();
	$('#geneAmpliconPCRDHistoryDiv').hide();
	$('#geneImageFileHistoryDiv').hide();
	
	var gName = $("#HistorySearch_geneName").val();
	var formName = $("#HistorySearch_formName").val();
	var addr = 'History.action';
	var gType = "C";
	var gDiv = '';
	var sType = "001002";
	if (formName == "Gene Details") {
		addr = 'geneCommentHistory.action';
		gDiv = '#geneDetailsHistoryDiv';
	}
	else 
		if (formName == "001/002 PCR (A)") {
			addr = 'PCRHistory.action';
			gDiv = '#genePCRHistoryDiv';
			gType = "A";
			sType = "001002";
		}
		else
			if ((formName == "Amplicon Purification and LIC (A)")||(formName == "Amplicon Purification and LIC (C)")||(formName == "Amplicon Purification and LIC (D)")) {
				addr = 'AMPHistory.action';
				if (formName == "Amplicon Purification and LIC (A)") {
					gDiv = '#geneAMPHistoryDiv';
					gType = "A";
				}
				else if(formName == "Amplicon Purification and LIC (C)") {
					gDiv = '#geneAMPHistoryCDiv';
					gType = "C";
				}
				else if(formName == "Amplicon Purification and LIC (D)") {
					gDiv = '#geneAMPHistoryDDiv';
					gType = "D";
				}
			}
			else
				if(formName == "001/026 Amplicon Purification (C)" || formName == "002/027 Amplicon Purification (C)" || formName == "001/028 Amplicon Purification (D)" || formName == "002/029 Amplicon Purification (D)") {
					addr = 'GeneAmpliconPurificationHistory';
					if(formName == "001/026 Amplicon Purification (C)") {gType = 'C';gDiv = '#geneAMPHistoryC1Div';sType="001026";}
					else if(formName == "001/028 Amplicon Purification (D)"){gType = 'D';gDiv = '#geneAMPHistoryD1Div';sType="001028";}
					else if(formName == "002/027 Amplicon Purification (C)"){gType = 'C';gDiv = '#geneAMPHistoryC2Div';sType="002027";}
					else{gType = 'D';gDiv = '#geneAMPHistoryD2Div';sType="002029";}
					
				}
			else
				if(formName == "Second Stage PCR (C)" || formName == "Second Stage PCR (D)") {
					addr = 'SecondPCRHistory';
					if(formName == "Second Stage PCR (C)") {gType = 'C';gDiv = '#geneSecondPCRHistoryCDiv';}
					else {gType = 'D';gDiv = 'geneSecondPCRHistoryDDiv';}
				}
			else
				if ((formName == "Colony PCR confirm A (700-For/700-Rev)")||(formName == "Colony PCR confirm B (700-For/700-Rev)")||(formName == "Colony PCR confirm C (700-For/700-Rev)")||(formName == "Colony PCR confirm D (700-For/700-Rev)")) {
					addr = 'GeneColonyHistory.action';
					if (formName == "Colony PCR confirm A (700-For/700-Rev)") {
						gDiv = '#colonyPCRAHistoryDiv';
						gType = "A";
					}
					else
						if (formName == "Colony PCR confirm B (700-For/700-Rev)") {
							gDiv = '#colonyPCRBHistoryDiv';
							gType = "B";
						}
						else
							if (formName == "Colony PCR confirm C (700-For/700-Rev)") {
								gDiv = '#colonyPCRCHistoryDiv';
								gType = "C";
							}
							else
								{
								gDiv = '#colonyPCRDHistoryDiv';
								gType = "D";
								}
					
				}
				else
					if ((formName == "Miniprep A")||(formName == "Miniprep B")||(formName == "Miniprep C")||(formName == "Miniprep D")) {
						addr = 'GeneMiniprepHistory.action';
						if (formName == "Miniprep A") {
							//alert(2);
							gDiv = '#minipreAHistoryDiv';
							gType = "A";
						}
						else
							if (formName == "Miniprep B") {
								gDiv = '#minipreBHistoryDiv';
								gType = "B";
							}
							else
								if (formName == "Miniprep C") {
									gDiv = '#minipreCHistoryDiv';
									gType = "C";
								}
								else
									{
									gDiv = '#minipreDHistoryDiv';
									gType = "D";
									}
					}
					else
						if ((formName == "Quickchange B")||formName == "001/026 PCR (C)" || formName == "002/027 PCR (C)" || formName == "001/028 PCR (D)" || formName == "002/029 PCR (D)") {
							addr = 'GeneQuickChangeHistory.action';
							if (formName == "Quickchange B") {
								gDiv = '#quickchangeBHistoryDiv';
								gType = "B";
							}
							else
								if (formName == "001/026 PCR (C)" || formName == "002/027 PCR (C)") {
									gType = "C";
									addr = 'PCRHistory.action';
									if(formName == "001/026 PCR (C)") {
										gDiv = '#genePCRHistoryC1Div';
										sType = "001026";
									}
									else {
										gDiv = '#genePCRHistoryC2Div';
										sType = "002027";
									}
								}
								else
									{
									gType = "D";
									addr = 'PCRHistory.action';
									if(formName == "001/028 PCR (D)") {
										gDiv = '#genePCRHistoryD1Div';
										sType = "001028";
									}
									else {
										gDiv = '#genePCRHistoryD2Div';
										sType = "002029";
									}
									}
						}
						else
							if ((formName == "B to TS559")||(formName == "C to TS559")||(formName == "D to TS559")) {
								addr = 'GeneTS559History.action';
								if (formName == "B to TS559") {
									gDiv = '#ts559BHistoryDiv';
									gType = "B";
								}
								else
									if (formName == "C to TS559") {
										gDiv = '#ts559CHistoryDiv';
										gType = "C";
									}
									else
										{
										//alert(2);
										gDiv = '#ts559DHistoryDiv';
										gType = "D";
										}
							}
							else
								if ((formName == "B Respotted")||(formName == "C Respotted")||(formName == "D Respotted")) {
									addr = 'GeneRespottedHistory.action';
									if (formName == "B Respotted") {
										gDiv = '#geneRespottedHistoryDiv';
										gType = "B";
									}
									else
										if (formName == "C Respotted") {
											gDiv = '#geneRespottedCHistoryDiv';
											gType = "C";
										}
										else
											{
											gDiv = '#geneRespottedDHistoryDiv';
											gType = "D";
											}
								}
								else
									if ((formName =="B Genomic Prep form intermediates")||(formName =="C Genomic Prep form intermediates")||(formName =="D Genomic Prep form intermediates")) {
										addr = 'GenePrepIntermediatesHistory.action';
										if (formName =="B Genomic Prep form intermediates") {
											gDiv = '#genePrepIntermediatesBHistoryDiv';
											gType = "B";
										}
										else
											if (formName =="C Genomic Prep form intermediates") {
												gDiv = '#genePrepIntermediatesCHistoryDiv';
												gType = "C";
											}
											else{
												gDiv = '#genePrepIntermediatesDHistoryDiv';
												gType = "D";
											}
									}
									else
										if ((formName == "B Plate to 6MP")||(formName == "C Plate to 6MP")||(formName == "D Plate to 6MP")) {
											addr = 'GenePlate6MPHistory.action';
											if (formName == "B Plate to 6MP") {
												gDiv = '#genePlate6MPBHistoryDiv';
												gType = "B";
											}
											else
												if (formName == "C Plate to 6MP") {
													gDiv = '#genePlate6MPCHistoryDiv';
													gType = "C";
												}
												else
													{
													gDiv = '#genePlate6MPDHistoryDiv';
													gType = "D";
													}
										}
										else
											if ((formName == "B Genomic Prep from finals")||(formName == "C Genomic Prep from finals")||(formName == "D Genomic Prep from finals")) {
												addr = 'GenePrepFinalsHistory.action';
												if (formName == "B Genomic Prep from finals") {
													gDiv = '#genePrepFinalsBHistoryDiv';
													gType = "B";
												}
												else
													if (formName == "C Genomic Prep from finals") {
														gDiv = '#genePrepFinalsCHistoryDiv';
														gType = "C";
													}
													else{
														gDiv = '#genePrepFinalsDHistoryDiv';
														gType = "D";
													}
											}
											else
												if (formName == "'W' PCR from finals (use TS559 g-DNA)") {
													gDiv = '#geneWPCRFinalsBHistoryDiv';
													addr = 'GeneWPCRFinalsHistory.action';
												}
												else
													if ((formName == "C Amplicon PCR")||(formName == "D Amplicon PCR")) {
														addr = 'GeneAmpliconPCRHistory.action';
														if (formName =="C Amplicon PCR") {
															gDiv = '#geneAmpliconPCRCHistoryDiv';
															gType = "C";
														}
														else
															{
															gDiv = '#geneAmpliconPCRDHistoryDiv';
															gType = "D";
															}
													}
													else
														if (formName == "Image Upload/Delete") {
															addr = 'ImageHistory.action';
															gDiv = '#geneImageFileHistoryDiv';
														}
	
	$.ajax({
        url: addr,
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:gName,
        	type: gType,
        	pcr: sType,
        	ampfType: sType,
        	ampType: sType,
        	stepType: gType
        	},
        timeout: 10000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert(1);
        	$(gDiv).show();
			$(gDiv).html(data);
        }
    });
};


var reportEmergency = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReport_geneName").val(),
        	formName: $("#emergencyReport_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPCR = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPCR_geneName").val(),
        	formName: $("#emergencyReportPCR_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPCRC1 = function(){
	
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPCRC1_geneName").val(),
        	formName: $("#emergencyReportPCRC1_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPCRC2 = function(){
	
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPCRC2_geneName").val(),
        	formName: $("#emergencyReportPCRC2_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPCRD1 = function(){
	
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPCRD1_geneName").val(),
        	formName: $("#emergencyReportPCRD1_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPCRD2 = function(){
	
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPCRD2_geneName").val(),
        	formName: $("#emergencyReportPCRD2_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAmpliconPurification001026C = function(){
	//alert(1);//should be here
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAmpliconPurification001026C_geneName").val(),
        	formName: $("#emergencyReportAmpliconPurification001026C_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAmpliconPurification001026D = function(){
	//alert(1);//should be here
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAmpliconPurification001026D_geneName").val(),
        	formName: $("#emergencyReportAmpliconPurification001026D_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAmpliconPurification002027C = function(){
	//alert(1);//should be here
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAmpliconPurification002027C_geneName").val(),
        	formName: $("#emergencyReportAmpliconPurification002027C_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAmpliconPurification002027D = function(){
	//alert(1);//should be here
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAmpliconPurification002027D_geneName").val(),
        	formName: $("#emergencyReportAmpliconPurification002027D_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencySecondPCRC = function(){
	//alert(1);//should be here
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportSecondPCRC_geneName").val(),
        	formName: $("#emergencyReportSecondPCRC_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencySecondPCRD = function(){
	//alert(1);//should be here
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportSecondPCRD_geneName").val(),
        	formName: $("#emergencyReportSecondPCRD_formName").val()
        	},
        timeout: 20000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAMP = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAMP_geneName").val(),
        	formName: $("#emergencyReportAMP_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAMPC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAMPC1_geneName").val(),
        	formName: $("#emergencyReportAMPC1_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};



var reportEmergencyAMPD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAMPD1_geneName").val(),
        	formName: $("#emergencyReportAMPD1_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};



var reportEmergencyColonyA = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportColonyA_geneName").val(),
        	formName: $("#emergencyReportColonyA_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyColonyB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportColonyB_geneName").val(),
        	formName: $("#emergencyReportColonyB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyColonyC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportColonyC_geneName").val(),
        	formName: $("#emergencyReportColonyC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyColonyD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportColonyD_geneName").val(),
        	formName: $("#emergencyReportColonyD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};


var reportEmergencyMiniprepA = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportMiniprepA_geneName").val(),
        	formName: $("#emergencyReportMiniprepA_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyMiniprepB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportMiniprepB_geneName").val(),
        	formName: $("#emergencyReportMiniprepB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyMiniprepC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportMiniprepC_geneName").val(),
        	formName: $("#emergencyReportMiniprepC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyMiniprepD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportMiniprepD_geneName").val(),
        	formName: $("#emergencyReportMiniprepD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyQuickChangeB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportQuickChangeB_geneName").val(),
        	formName: $("#emergencyReportQuickChangeB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyQuickChangeC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportQuickChangeC_geneName").val(),
        	formName: $("#emergencyReportQuickChangeC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};
var reportEmergencyQuickChangeD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportQuickChangeD_geneName").val(),
        	formName: $("#emergencyReportQuickChangeD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyTS559B = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportTS559B_geneName").val(),
        	formName: $("#emergencyReportTS559B_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyRespottedB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportRespottedB_geneName").val(),
        	formName: $("#emergencyReportRespottedB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPrepIntermeidatesB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyPrepIntermediatesB_geneName").val(),
        	formName: $("#emergencyPrepIntermediatesB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPlate6MPB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPlate6MPB_geneName").val(),
        	formName: $("#emergencyReportPlate6MPB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};


var reportEmergencyPrepFinalsB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPrepFinalsB_geneName").val(),
        	formName: $("#emergencyReportPrepFinalsB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyWPCRFinalsB = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportWPCRFinalsB_geneName").val(),
        	formName: $("#emergencyReportWPCRFinalsB_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyTS559C = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportTS559C_geneName").val(),
        	formName: $("#emergencyReportTS559C_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyRespottedC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportRespottedC_geneName").val(),
        	formName: $("#emergencyReportRespottedC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPrepIntermeidatesC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyPrepIntermediatesC_geneName").val(),
        	formName: $("#emergencyPrepIntermediatesC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPlate6MPC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPlate6MPC_geneName").val(),
        	formName: $("#emergencyReportPlate6MPC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPrepFinalsC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPrepFinalsC_geneName").val(),
        	formName: $("#emergencyReportPrepFinalsC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAmpliconPCRC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAmpliconPCRC_geneName").val(),
        	formName: $("#emergencyReportAmpliconPCRC_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyTS559D = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportTS559D_geneName").val(),
        	formName: $("#emergencyReportTS559D_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyRespottedD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportRespottedD_geneName").val(),
        	formName: $("#emergencyReportRespottedD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPrepIntermeidatesD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyPrepIntermediatesD_geneName").val(),
        	formName: $("#emergencyPrepIntermediatesD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPlate6MPD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPlate6MPD_geneName").val(),
        	formName: $("#emergencyReportPlate6MPD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyPrepFinalsD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportPrepFinalsD_geneName").val(),
        	formName: $("#emergencyReportPrepFinalsD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var reportEmergencyAmpliconPCRD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'emergencyReport.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#emergencyReportAmpliconPCRD_geneName").val(),
        	formName:$("#emergencyReportAmpliconPCRD_formName").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("An Emergency Email has been sent to Tom!");      
        }
    });  
};

var addcomment = function(){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
	var comments = $("#updateGeneComment_comment").val();
	if (comments == "") {
		alert("Please insert a comment");
		return;
	}
	if (comments.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
    $.ajax({
        url: 'updateGeneComment.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneComment_geneName").val(),
        	comment: $("#updateGeneComment_comment").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The comment has been saved!");
            $('#geneDetailDiv').show();
			 $('#geneDetailDiv').html(data);	       
        }
    });  
};

var viewPCR = function(){
	//alert(1);//should be here
	//var url = 'viewGenePCR.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'viewGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGenePCR_geneName").val(),
        	comment: $("#viewGenePCR_comment").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#genePCRDiv').show();
			 $('#genePCRDiv').html(data);	       
        }
    });  
};

var updatePCR = function(){
	
	var d = $("#updateGenePCR_recordDate").val();
	var s = $("#updateGenePCR_sizeOne").val();
	var a = $("#updateGenePCR_amplicon").val();
	var c = $("#updateGenePCR_comment").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (s == "") {
		alert("Please fill in the Size");
		return;
	}
	if (a == "") {
		alert("Please fill in the Amplicon (yes/no)");
		return;
	}
	if ((a != 'Y')&&(a != 'N')&&(a != 'Yes')&&(a != 'No')&&(a != 'yes')&&((a != 'no'))) {
		alert("Only (Yes, No) are accepted for Amplicon");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
	//alert(myTextField.value);
    $.ajax({
        url: 'updateGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGenePCR_geneName").val(),
        	recordDate: $("#updateGenePCR_recordDate").val(),
        	sizeOne: $("#updateGenePCR_sizeOne").val(),
        	amplicon: $("#updateGenePCR_amplicon").val(),
        	comment: $("#updateGenePCR_comment").val(),
        	pcrType: $("#updateGenePCR_pcr").val(),
        	stepType: $("#updateGenePCR_stepType").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The pcr form has been saved!");
            $('#genePCRDiv').show();
			 $('#genePCRDiv').html(data);	       
        }
    });  
};

var updatePCRC1 = function(){
	
	var d = $("#updateGenePCRC1_recordDate").val();
	var s = $("#updateGenePCRC1_sizeOne").val();
	var a = $("#updateGenePCRC1_amplicon").val();
	var c = $("#updateGenePCRC1_comment").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (s == "") {
		alert("Please fill in the Size");
		return;
	}
	if (a == "") {
		alert("Please fill in the Amplicon (yes/no)");
		return;
	}
	if ((a != 'Y')&&(a != 'N')&&(a != 'Yes')&&(a != 'No')&&(a != 'yes')&&((a != 'no'))) {
		alert("Only (Yes, No) are accepted for Amplicon");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
	//alert(myTextField.value);
    $.ajax({
        url: 'updateGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGenePCRC1_geneName").val(),
        	recordDate: $("#updateGenePCRC1_recordDate").val(),
        	sizeOne: $("#updateGenePCRC1_sizeOne").val(),
        	amplicon: $("#updateGenePCRC1_amplicon").val(),
        	comment: $("#updateGenePCRC1_comment").val(),
        	pcrType: $("#updateGenePCRC1_pcr").val(),
        	stepType: $("#updateGenePCRC1_stepType").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The pcr form has been saved!");
            $('#genePCR001026CDiv').show();
			 $('#genePCR001026CDiv').html(data);	       
        }
    });  
};

var updatePCRC2 = function(){
	
	var d = $("#updateGenePCRC2_recordDate").val();
	var s = $("#updateGenePCRC2_sizeOne").val();
	var a = $("#updateGenePCRC2_amplicon").val();
	var c = $("#updateGenePCRC2_comment").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (s == "") {
		alert("Please fill in the Size");
		return;
	}
	if (a == "") {
		alert("Please fill in the Amplicon (yes/no)");
		return;
	}
	if ((a != 'Y')&&(a != 'N')&&(a != 'Yes')&&(a != 'No')&&(a != 'yes')&&((a != 'no'))) {
		alert("Only (Yes, No) are accepted for Amplicon");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
	//alert(myTextField.value);
    $.ajax({
        url: 'updateGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGenePCRC2_geneName").val(),
        	recordDate: $("#updateGenePCRC2_recordDate").val(),
        	sizeOne: $("#updateGenePCRC2_sizeOne").val(),
        	amplicon: $("#updateGenePCRC2_amplicon").val(),
        	comment: $("#updateGenePCRC2_comment").val(),
        	pcrType: $("#updateGenePCRC2_pcr").val(),
        	stepType: $("#updateGenePCRC2_stepType").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The pcr form has been saved!");
            $('#genePCR002027CDiv').show();
			 $('#genePCR002027CDiv').html(data);	       
        }
    });  
};

var updatePCRD1 = function(){
	
	var d = $("#updateGenePCRD1_recordDate").val();
	var s = $("#updateGenePCRD1_sizeOne").val();
	var a = $("#updateGenePCRD1_amplicon").val();
	var c = $("#updateGenePCRD1_comment").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (s == "") {
		alert("Please fill in the Size");
		return;
	}
	if (a == "") {
		alert("Please fill in the Amplicon (yes/no)");
		return;
	}
	if ((a != 'Y')&&(a != 'N')&&(a != 'Yes')&&(a != 'No')&&(a != 'yes')&&((a != 'no'))) {
		alert("Only (Yes, No) are accepted for Amplicon");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
	//alert(myTextField.value);
    $.ajax({
        url: 'updateGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGenePCRD1_geneName").val(),
        	recordDate: $("#updateGenePCRD1_recordDate").val(),
        	sizeOne: $("#updateGenePCRD1_sizeOne").val(),
        	amplicon: $("#updateGenePCRD1_amplicon").val(),
        	comment: $("#updateGenePCRD1_comment").val(),
        	pcrType: $("#updateGenePCRD1_pcr").val(),
        	stepType: $("#updateGenePCRD1_stepType").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The pcr form has been saved!");
            $('#genePCR001026DDiv').show();
			$('#genePCR001026DDiv').html(data);	       
        }
    });  
};

var updatePCRD2 = function(){
	
	var d = $("#updateGenePCRD2_recordDate").val();
	var s = $("#updateGenePCRD2_sizeOne").val();
	var a = $("#updateGenePCRD2_amplicon").val();
	var c = $("#updateGenePCRD2_comment").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (s == "") {
		alert("Please fill in the Size");
		return;
	}
	if (a == "") {
		alert("Please fill in the Amplicon (yes/no)");
		return;
	}
	if ((a != 'Y')&&(a != 'N')&&(a != 'Yes')&&(a != 'No')&&(a != 'yes')&&((a != 'no'))) {
		alert("Only (Yes, No) are accepted for Amplicon");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
	//alert(myTextField.value);
    $.ajax({
        url: 'updateGenePCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGenePCRD2_geneName").val(),
        	recordDate: $("#updateGenePCRD2_recordDate").val(),
        	sizeOne: $("#updateGenePCRD2_sizeOne").val(),
        	amplicon: $("#updateGenePCRD2_amplicon").val(),
        	comment: $("#updateGenePCRD2_comment").val(),
        	pcrType: $("#updateGenePCRD2_pcr").val(),
        	stepType: $("#updateGenePCRD2_stepType").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The pcr form has been saved!");
            $('#genePCR002027DDiv').show();
			$('#genePCR002027DDiv').html(data);	       
        }
    });  
};

var updateAmpliconPurification001026C = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAmpliconPurification001026C_recordDate").val();
	var m = $("#updateGeneAmpliconPurification001026C_ml").val();
	var c = $("#updateGeneAmpliconPurification001026C_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAmpliconPurification001026C_geneName").val(),
        	recordDate: $("#updateGeneAmpliconPurification001026C_recordDate").val(),
        	ml: $("#updateGeneAmpliconPurification001026C_ml").val(),
        	comments: $("#updateGeneAmpliconPurification001026C_comments").val(),
        	ampType: "001026",
        	stepType: "C"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The 001026 Amplicon Purification form (C) have been saved!");
            $('#geneAMP001026CDiv').show();
			$('#geneAMP001026CDiv').html(data);	       
        }
    });  
};

var updateAmpliconPurification002027C = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAmpliconPurification002027C_recordDate").val();
	var m = $("#updateGeneAmpliconPurification002027C_ml").val();
	var c = $("#updateGeneAmpliconPurification002027C_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAmpliconPurification002027C_geneName").val(),
        	recordDate: $("#updateGeneAmpliconPurification002027C_recordDate").val(),
        	ml: $("#updateGeneAmpliconPurification002027C_ml").val(),
        	comments: $("#updateGeneAmpliconPurification002027C_comments").val(),
        	ampType: "002027",
        	stepType: "C"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The 002027 Amplicon Purification form (C) have been saved!");
            $('#geneAMP002027CDiv').show();
			$('#geneAMP002027CDiv').html(data);	       
        }
    });  
};

var updateAmpliconPurification001026D = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAmpliconPurification001026D_recordDate").val();
	var m = $("#updateGeneAmpliconPurification001026D_ml").val();
	var c = $("#updateGeneAmpliconPurification001026D_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAmpliconPurification001026D_geneName").val(),
        	recordDate: $("#updateGeneAmpliconPurification001026D_recordDate").val(),
        	ml: $("#updateGeneAmpliconPurification001026D_ml").val(),
        	comments: $("#updateGeneAmpliconPurification001026D_comments").val(),
        	ampType: "001028",
        	stepType: "D"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The 001028 Amplicon Purification form (D) have been saved!");
            $('#geneAMP001026DDiv').show();
			$('#geneAMP001026DDiv').html(data);	       
        }
    });  
};

var updateAmpliconPurification002027D = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAmpliconPurification002027D_recordDate").val();
	var m = $("#updateGeneAmpliconPurification002027D_ml").val();
	var c = $("#updateGeneAmpliconPurification002027D_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAmpliconPurification.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAmpliconPurification002027D_geneName").val(),
        	recordDate: $("#updateGeneAmpliconPurification002027D_recordDate").val(),
        	ml: $("#updateGeneAmpliconPurification002027D_ml").val(),
        	comments: $("#updateGeneAmpliconPurification002027D_comments").val(),
        	ampType: "002029",
        	stepType: "D"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The 002029 Amplicon Purification form (D) have been saved!");
            $('#geneAMP002027DDiv').show();
			$('#geneAMP002027DDiv').html(data);	       
        }
    });  
};

var viewAMP = function(){
	//alert(1);//should be here
	//var url = 'viewGeneAMP.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'viewGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGeneAMP_geneName").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#geneAMPDiv').show();
			$('#geneAMPDiv').html(data);	       
        }
    });  
};

var updateSecondPCRC = function(){
  // or use $.post
	var d = $("#secondPCRC_recordDate").val();
	var m1 = $("#secondPCRC_ml1").val();
	var v1 = $("#secondPCRC_volume1").val();
	var m2 = $("#secondPCRC_ml2").val();
	var v2 = $("#secondPCRC_volume2").val();
	var c = $("#secondPCRC_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m1 == "") {
		alert("Please fill in the [ng/ul] 001026");
		return;
	}
	if (v1 == "") {
		alert("Please fill in the Volume 001026");
		return;
	}
	if (m2 == "") {
		alert("Please fill in the [ng/ul] 002027");
		return;
	}
	if (v2 == "") {
		alert("Please fill in the Volume 002027");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneSecondPCR.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#secondPCRC_geneName").val(),
        	recordDate: $("#secondPCRC_recordDate").val(),
        	ml1: $("#secondPCRC_ml1").val(),
        	volume1: $("#secondPCRC_volume1").val(),
        	ml2: $("#secondPCRC_ml2").val(),
        	volume2: $("#secondPCRC_volume2").val(),
        	comments: $("#secondPCRC_comments").val(),
        	stepType: "C"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Second Stage PCR form (C) have been saved!");
            $('#geneSecondStagePCRCDiv').show();
			$('#geneSecondStagePCRCDiv').html(data);	       
        }
    });  
};

var updateSecondPCRD = function(){
	  // or use $.post
		var d = $("#secondPCRD_recordDate").val();
		var m1 = $("#secondPCRD_ml1").val();
		var v1 = $("#secondPCRD_volume1").val();
		var m2 = $("#secondPCRD_ml2").val();
		var v2 = $("#secondPCRD_volume2").val();
		var c = $("#secondPCRD_comments").val();
		if (d == "") {
			alert("Please fill in the Date");
			return;
		}
		if (m1 == "") {
			alert("Please fill in the [ng/ul] 001026");
			return;
		}
		if (v1 == "") {
			alert("Please fill in the Volume 001026");
			return;
		}
		if (m2 == "") {
			alert("Please fill in the [ng/ul] 002027");
			return;
		}
		if (v2 == "") {
			alert("Please fill in the Volume 002027");
			return;
		}
		if (c.length > 999) {
			alert("Please limit the comment in 999 characters");
			return;
		}
		
	    $.ajax({
	        url: 'updateGeneSecondPCR.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#secondPCRD_geneName").val(),
	        	recordDate: $("#secondPCRD_recordDate").val(),
	        	ml1: $("#secondPCRD_ml1").val(),
	        	volume1: $("#secondPCRD_volume1").val(),
	        	ml2: $("#secondPCRD_ml2").val(),
	        	volume2: $("#secondPCRD_volume2").val(),
	        	comments: $("#secondPCRD_comments").val(),
	        	stepType: "D"
	        	},
	        timeout: 1000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	alert("The Second Stage PCR form (D) have been saved!");
	            $('#geneSecondStagePCRDDiv').show();
				$('#geneSecondStagePCRDDiv').html(data);	       
	        }
	    });  
	};

var updateAMP = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAMP_recordDate").val();
	var m = $("#updateGeneAMP_ml").val();
	var v = $("#updateGeneAMP_volume").val();
	var e = $("#updateGeneAMP_excess").val();
	var s = $("#updateGeneAMP_stored").val();
	var p = $("#updateGeneAMP_position").val();
	var c = $("#updateGeneAMP_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (v == "") {
		alert("Please fill in the Volume");
		return;
	}
	if (e == "") {
		alert("Please fill in the Excess");
		return;
	}
	if (s == "") {
		alert("Please fill in the Stored in box");
		return;
	}
	if (p == "") {
		alert("Please fill in the Position");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAMP_geneName").val(),
        	recordDate: $("#updateGeneAMP_recordDate").val(),
        	ml: $("#updateGeneAMP_ml").val(),
        	volume: $("#updateGeneAMP_volume").val(),
        	excess: $("#updateGeneAMP_excess").val(),
        	stored: $("#updateGeneAMP_stored").val(),
        	position: $("#updateGeneAMP_position").val(),
        	comments: $("#updateGeneAMP_comments").val(),
        	ampfType: $("#updateGeneAMP_ampfType").val(),
        	stepType: "A"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The 001/002 Amplicon Purification and LIC form (A) have been saved!");
            $('#geneAMPDiv').show();
			$('#geneAMPDiv').html(data);	       
        }
    });  
};

var updateAMPC = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAMPC_recordDate").val();
	var m = $("#updateGeneAMPC_ml").val();
	var v = $("#updateGeneAMPC_volume").val();
	var e = $("#updateGeneAMPC_excess").val();
	var s = $("#updateGeneAMPC_stored").val();
	var p = $("#updateGeneAMPC_position").val();
	var c = $("#updateGeneAMPC_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (v == "") {
		alert("Please fill in the Volume");
		return;
	}
	if (e == "") {
		alert("Please fill in the Excess");
		return;
	}
	if (s == "") {
		alert("Please fill in the Stored in box");
		return;
	}
	if (p == "") {
		alert("Please fill in the Position");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAMPC_geneName").val(),
        	recordDate: $("#updateGeneAMPC_recordDate").val(),
        	ml: $("#updateGeneAMPC_ml").val(),
        	volume: $("#updateGeneAMPC_volume").val(),
        	excess: $("#updateGeneAMPC_excess").val(),
        	stored: $("#updateGeneAMPC_stored").val(),
        	position: $("#updateGeneAMPC_position").val(),
        	comments: $("#updateGeneAMPC_comments").val(),
        	stepType: "C"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Amplicon Purification and LIC form (C) have been saved!");
            $('#geneAMPCDiv').show();
			$('#geneAMPCDiv').html(data);	       
        }
    });  
};


var updateAMPD = function(){
	//alert(1);//should be here
	//var url = 'updateGeneAMP.action'; //action relative path
  // or use $.post
	var d = $("#updateGeneAMPD_recordDate").val();
	var m = $("#updateGeneAMPD_ml").val();
	var v = $("#updateGeneAMPD_volume").val();
	var e = $("#updateGeneAMPD_excess").val();
	var s = $("#updateGeneAMPD_stored").val();
	var p = $("#updateGeneAMPD_position").val();
	var c = $("#updateGeneAMPD_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (v == "") {
		alert("Please fill in the Volume");
		return;
	}
	if (e == "") {
		alert("Please fill in the Excess");
		return;
	}
	if (s == "") {
		alert("Please fill in the Stored in box");
		return;
	}
	if (p == "") {
		alert("Please fill in the Position");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneAMP.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneAMPD_geneName").val(),
        	recordDate: $("#updateGeneAMPD_recordDate").val(),
        	ml: $("#updateGeneAMPD_ml").val(),
        	volume: $("#updateGeneAMPD_volume").val(),
        	excess: $("#updateGeneAMPD_excess").val(),
        	stored: $("#updateGeneAMPD_stored").val(),
        	position: $("#updateGeneAMPD_position").val(),
        	comments: $("#updateGeneAMPD_comments").val(),
        	ampfType: $("#updateGeneAMPD_ampfType").val(),
        	stepType: "D"
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Amplicon Purification and LIC form (D) have been saved!");
            $('#geneAMPDDiv').show();
			$('#geneAMPDDiv').html(data);	       
        }
    });  
};



var viewColonyA = function(){
	//alert(1);//should be here
	//var url = 'viewGeneColony.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'viewGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGeneColonyA_geneName").val(),
        	type: $("#viewGeneColonyA_type").val()
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#colonyPCRADiv').show();
			$('#colonyPCRADiv').html(data);	       
        }
    });  
};

var updateColonyA = function(){
	//alert(1);//should be here
  // or use $.post
	var test = null; 
	var t30 = null;
	var t31 = null;
	var t32 = null;
	var t33 = null;
	var t34 = null;
	var t35 = null;
	var t36 = null;
	var t37 = null;
	var t38 = null;
	var t39 = null;
	var t40 = null;
	var t41 = null;
	var t42 = null;
	var t43 = null;
	var t44 = null;
	var t45 = null;
	var t46 = null;
	var t47 = null;
	var t48 = null;
	var t49 = null;
	var t50 = null;
	var t51 = null;
	var t52 = null;
	var t53 = null;
	var t54 = null;
	var t55 = null;
	var t56 = null;
	var t57 = null;
	var t58 = null;
	var t59 = null;
	
	test = document.getElementsByName('z30')[0].checked;
	if (test == true) {
		t30 = "yes";
	}
	if (t30 == null) {
		var test1 = document.getElementsByName('z30')[1].checked;
		if ( test1 == true) {
			t30 = "no";
		}
	}
	test = document.getElementsByName('z31')[0].checked;
	if (test == true) {
		t31 = "yes";
	}
	if (t31 == null) {
		var test1 = document.getElementsByName('z31')[1].checked;
		if ( test1 == true) {
			t31 = "no";
		}
	}
	test = document.getElementsByName('z32')[0].checked;
	if (test == true) {
		t32 = "yes";
	}
	if (t32 == null) {
		var test1 = document.getElementsByName('z32')[1].checked;
		if ( test1 == true) {
			t32 = "no";
		}
	}
	test = document.getElementsByName('z33')[0].checked;
	if (test == true) {
		t33 = "yes";
	}
	if (t33 == null) {
		var test1 = document.getElementsByName('z33')[1].checked;
		if ( test1 == true) {
			t33 = "no";
		}
	}
	test = document.getElementsByName('z34')[0].checked;
	if (test == true) {
		t34 = "yes";
	}
	if (t34 == null) {
		var test1 = document.getElementsByName('z34')[1].checked;
		if ( test1 == true) {
			t34 = "no";
		}
	}
	
	test = document.getElementsByName('z35')[0].checked;
	if (test == true) {
		t35 = "yes";
	}
	if (t35 == null) {
		var test1 = document.getElementsByName('z35')[1].checked;
		if ( test1 == true) {
			t35 = "no";
		}
	}
	
	test = document.getElementsByName('z36')[0].checked;
	if (test == true) {
		t36 = "yes";
	}
	if (t36 == null) {
		var test1 = document.getElementsByName('z36')[1].checked;
		if ( test1 == true) {
			t36 = "no";
		}
	}
	test = document.getElementsByName('z37')[0].checked;
	if (test == true) {
		t37 = "yes";
	}
	if (t37 == null) {
		var test1 = document.getElementsByName('z37')[1].checked;
		if ( test1 == true) {
			t37 = "no";
		}
	}
	test = document.getElementsByName('z38')[0].checked;
	if (test == true) {
		t38 = "yes";
	}
	if (t38 == null) {
		var test1 = document.getElementsByName('z38')[1].checked;
		if ( test1 == true) {
			t38 = "no";
		}
	}
	test = document.getElementsByName('z39')[0].checked;
	if (test == true) {
		t39 = "yes";
	}
	if (t39 == null) {
		var test1 = document.getElementsByName('z39')[1].checked;
		if ( test1 == true) {
			t39 = "no";
		}
	}
	test = document.getElementsByName('z40')[0].checked;
	if (test == true) {
		t40 = "yes";
	}
	if (t40 == null) {
		var test1 = document.getElementsByName('z40')[1].checked;
		if ( test1 == true) {
			t40 = "no";
		}
	}
	test = document.getElementsByName('z41')[0].checked;
	if (test == true) {
		t41 = "yes";
	}
	if (t41 == null) {
		var test1 = document.getElementsByName('z41')[1].checked;
		if ( test1 == true) {
			t41 = "no";
		}
	}
	test = document.getElementsByName('z42')[0].checked;
	if (test == true) {
		t42 = "yes";
	}
	if (t42 == null) {
		var test1 = document.getElementsByName('z42')[1].checked;
		if ( test1 == true) {
			t42 = "no";
		}
	}
	test = document.getElementsByName('z43')[0].checked;
	if (test == true) {
		t43 = "yes";
	}
	if (t43 == null) {
		var test1 = document.getElementsByName('z43')[1].checked;
		if ( test1 == true) {
			t43 = "no";
		}
	}
	test = document.getElementsByName('z44')[0].checked;
	if (test == true) {
		t44 = "yes";
	}
	if (t44 == null) {
		var test1 = document.getElementsByName('z44')[1].checked;
		if ( test1 == true) {
			t44 = "no";
		}
	}
	
	test = document.getElementsByName('z45')[0].checked;
	if (test == true) {
		t45 = "yes";
	}
	if (t45 == null) {
		var test1 = document.getElementsByName('z45')[1].checked;
		if ( test1 == true) {
			t45 = "no";
		}
	}
	
	test = document.getElementsByName('z46')[0].checked;
	if (test == true) {
		t46 = "yes";
	}
	if (t46 == null) {
		var test1 = document.getElementsByName('z46')[1].checked;
		if ( test1 == true) {
			t46 = "no";
		}
	}
	test = document.getElementsByName('z47')[0].checked;
	if (test == true) {
		t47 = "yes";
	}
	if (t47 == null) {
		var test1 = document.getElementsByName('z47')[1].checked;
		if ( test1 == true) {
			t47 = "no";
		}
	}
	test = document.getElementsByName('z48')[0].checked;
	if (test == true) {
		t48 = "yes";
	}
	if (t48 == null) {
		var test1 = document.getElementsByName('z48')[1].checked;
		if ( test1 == true) {
			t48 = "no";
		}
	}
	test = document.getElementsByName('z49')[0].checked;
	if (test == true) {
		t49 = "yes";
	}
	if (t49 == null) {
		var test1 = document.getElementsByName('z49')[1].checked;
		if ( test1 == true) {
			t49 = "no";
		}
	}
	test = document.getElementsByName('z50')[0].checked;
	if (test == true) {
		t50 = "yes";
	}
	if (t50 == null) {
		var test1 = document.getElementsByName('z50')[1].checked;
		if ( test1 == true) {
			t50 = "no";
		}
	}
	test = document.getElementsByName('z51')[0].checked;
	if (test == true) {
		t51 = "yes";
	}
	if (t51 == null) {
		var test1 = document.getElementsByName('z51')[1].checked;
		if ( test1 == true) {
			t51 = "no";
		}
	}
	test = document.getElementsByName('z52')[0].checked;
	if (test == true) {
		t52 = "yes";
	}
	if (t52 == null) {
		var test1 = document.getElementsByName('z52')[1].checked;
		if ( test1 == true) {
			t52 = "no";
		}
	}
	test = document.getElementsByName('z53')[0].checked;
	if (test == true) {
		t53 = "yes";
	}
	if (t53 == null) {
		var test1 = document.getElementsByName('z53')[1].checked;
		if ( test1 == true) {
			t53 = "no";
		}
	}
	test = document.getElementsByName('z54')[0].checked;
	if (test == true) {
		t54 = "yes";
	}
	if (t54 == null) {
		var test1 = document.getElementsByName('z54')[1].checked;
		if ( test1 == true) {
			t54 = "no";
		}
	}
	
	test = document.getElementsByName('z55')[0].checked;
	if (test == true) {
		t55 = "yes";
	}
	if (t55 == null) {
		var test1 = document.getElementsByName('z55')[1].checked;
		if ( test1 == true) {
			t55 = "no";
		}
	}
	
	test = document.getElementsByName('z56')[0].checked;
	if (test == true) {
		t56 = "yes";
	}
	if (t56 == null) {
		var test1 = document.getElementsByName('z56')[1].checked;
		if ( test1 == true) {
			t56 = "no";
		}
	}
	test = document.getElementsByName('z57')[0].checked;
	if (test == true) {
		t57 = "yes";
	}
	if (t57 == null) {
		var test1 = document.getElementsByName('z57')[1].checked;
		if ( test1 == true) {
			t57 = "no";
		}
	}
	test = document.getElementsByName('z58')[0].checked;
	if (test == true) {
		t58 = "yes";
	}
	if (t58 == null) {
		var test1 = document.getElementsByName('z58')[1].checked;
		if ( test1 == true) {
			t58 = "no";
		}
	}
	test = document.getElementsByName('z59')[0].checked;
	if (test == true) {
		t59 = "yes";
	}
	if (t59 == null) {
		var test1 = document.getElementsByName('z59')[1].checked;
		if ( test1 == true) {
			t59 = "no";
		}
	}

	$.ajax({
        url: 'updateGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneColonyA_geneName").val(),
        	type: $("#updateGeneColonyA_type").val(),
        	esize: $("#updateGeneColonyA_esize").val(),
        	date1: $("#updateGeneColonyA_date1").val(),
        	date2: $("#updateGeneColonyA_date2").val(),
        	date3: $("#updateGeneColonyA_date3").val(),
        	z30: t30,
        	z31: t31,
        	z32: t32,
        	z33: t33,
        	z34: t34,
        	z35: t35,
        	z36: t36,
        	z37: t37,
        	z38: t38,
        	z39: t39,
        	z40: t40,
        	z41: t41,
        	z42: t42,
        	z43: t43,
        	z44: t44,
        	z45: t45,
        	z46: t46,
        	z47: t47,
        	z48: t48,
        	z49: t49,
        	z50: t50,
        	z51: t51,
        	z52: t52,
        	z53: t53,
        	z54: t54,
        	z55: t55,
        	z56: t56,
        	z57: t57,
        	z58: t58,
        	z59: t59
        	},
        timeout: 2000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The ColonyPRC A form have been saved!");
            //$('#colonyPCRADiv').show();
			//$('#colonyPCRADiv').html(data);	       
        }
    });  
};

var viewMinipreA = function(){
	//alert("This is view MinipreA");//should be here
  // or use $.post
    $.ajax({
        url: 'viewGeneMinipre.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGeneMinipreA_geneName").val(),
        	type: $("#viewGeneMinipreA_type").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#minipreADiv').show();
			$('#minipreADiv').html(data);	       
        }
    });  
};

var updateMiniprepA = function(){
	//alert(1);//should be here
	var d = $("#updateGeneMiniprepA_recordDate").val();
	var cl = $("#updateGeneMiniprepA_colony").val();
	var m = $("#updateGeneMiniprepA_ml").val();	
	var test = document.getElementsByName('seqConfirmed')[0].checked;
	var rs = null;
	if (test == true) {
		rs = "Yes";
	}
	if (rs == null) {
		var test1 = document.getElementsByName('seqConfirmed')[1].checked;
		if ( test1 == true) {
			rs = "No";
		}
	}
	var r = rs;
	var c = $("#updateGeneMiniprepA_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (cl == "") {
		alert("Please fill in the Colony");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (r == null) {
		alert("Please Select the Sequence Confirmed");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
	
    $.ajax({
        url: 'updateGeneMiniprep.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneMiniprepA_geneName").val(),
        	type: $("#updateGeneMiniprepA_type").val(),
        	recordDate: $("#updateGeneMiniprepA_recordDate").val(),
        	colony: $("#updateGeneMiniprepA_colony").val(),
        	ml: $("#updateGeneMiniprepA_ml").val(),
        	seqConfirmed: rs,
        	comments: $("#updateGeneMiniprepA_comments").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Miniprep A form have been saved!");
            //$('#minipreADiv').show();
			//$('#minipreADiv').html(data);	       
        }
    });  
};

var viewQuickChangeB = function(){
  // or use $.post
    $.ajax({
        url: 'viewGeneQuickChange.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGeneQuickChangeB_geneName").val(),
        	type: $("#viewGeneQuickChangeB_type").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#quickchangeBDiv').show();
			$('#quickchangeBDiv').html(data);	       
        }
    });  
};

var updateQuickChangeB = function(){
	//alert(1);//should be here
	var d = $("#updateGeneQuickChangeB_recordDate").val();
	var c = $("#updateGeneQuickChangeB_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
    $.ajax({
        url: 'updateGeneQuickChange.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneQuickChangeB_geneName").val(),
        	type: $("#updateGeneQuickChangeB_type").val(),
        	recordDate: $("#updateGeneQuickChangeB_recordDate").val(),
        	comments: $("#updateGeneQuickChangeB_comments").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The QuickChange B form have been saved!");
            //$('#minipreADiv').show();
			//$('#minipreADiv').html(data);	       
        }
    });  
};



var viewColonyB = function(){
	//alert("This is view ColonyB");//should be here
	//var url = 'viewGeneColony.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'viewGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGeneColonyB_geneName").val(),
        	type: $("#viewGeneColonyB_type").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#colonyPCRBDiv').show();
			$('#colonyPCRBDiv').html(data);	       
        }
    });  
};

var updateColonyB = function(){
	//alert(1);//should be here
  // or use $.post
	var test = null; 
	var t60 = null;
	var t61 = null;
	var t62 = null;
	var t63 = null;
	var t64 = null;
	var t65 = null;
	var t66 = null;
	var t67 = null;
	var t68 = null;
	var t69 = null;
	var t70 = null;
	var t71 = null;
	var t72 = null;
	var t73 = null;
	var t74 = null;
	var t75 = null;
	var t76 = null;
	var t77 = null;
	var t78 = null;
	var t79 = null;
	
	test = document.getElementsByName('z60')[0].checked;
	if (test == true) {
		t60 = "yes";
	}
	if (t60 == null) {
		var test1 = document.getElementsByName('z60')[1].checked;
		if ( test1 == true) {
			t60 = "no";
		}
	}
	test = document.getElementsByName('z61')[0].checked;
	if (test == true) {
		t61 = "yes";
	}
	if (t61 == null) {
		var test1 = document.getElementsByName('z61')[1].checked;
		if ( test1 == true) {
			t61 = "no";
		}
	}
	test = document.getElementsByName('z62')[0].checked;
	if (test == true) {
		t62 = "yes";
	}
	if (t62 == null) {
		var test1 = document.getElementsByName('z62')[1].checked;
		if ( test1 == true) {
			t62 = "no";
		}
	}
	test = document.getElementsByName('z63')[0].checked;
	if (test == true) {
		t63 = "yes";
	}
	if (t63 == null) {
		var test1 = document.getElementsByName('z63')[1].checked;
		if ( test1 == true) {
			t63 = "no";
		}
	}
	test = document.getElementsByName('z64')[0].checked;
	if (test == true) {
		t64 = "yes";
	}
	if (t64 == null) {
		var test1 = document.getElementsByName('z64')[1].checked;
		if ( test1 == true) {
			t64 = "no";
		}
	}
	
	test = document.getElementsByName('z65')[0].checked;
	if (test == true) {
		t65 = "yes";
	}
	if (t65 == null) {
		var test1 = document.getElementsByName('z65')[1].checked;
		if ( test1 == true) {
			t65 = "no";
		}
	}
	
	test = document.getElementsByName('z66')[0].checked;
	if (test == true) {
		t66 = "yes";
	}
	if (t66 == null) {
		var test1 = document.getElementsByName('z66')[1].checked;
		if ( test1 == true) {
			t66 = "no";
		}
	}
	test = document.getElementsByName('z67')[0].checked;
	if (test == true) {
		t67 = "yes";
	}
	if (t67 == null) {
		var test1 = document.getElementsByName('z67')[1].checked;
		if ( test1 == true) {
			t67 = "no";
		}
	}
	test = document.getElementsByName('z68')[0].checked;
	if (test == true) {
		t68 = "yes";
	}
	if (t68 == null) {
		var test1 = document.getElementsByName('z68')[1].checked;
		if ( test1 == true) {
			t68 = "no";
		}
	}
	test = document.getElementsByName('z69')[0].checked;
	if (test == true) {
		t69 = "yes";
	}
	if (t69 == null) {
		var test1 = document.getElementsByName('z69')[1].checked;
		if ( test1 == true) {
			t69 = "no";
		}
	}
	test = document.getElementsByName('z70')[0].checked;
	if (test == true) {
		t70 = "yes";
	}
	if (t70 == null) {
		var test1 = document.getElementsByName('z70')[1].checked;
		if ( test1 == true) {
			t70 = "no";
		}
	}
	test = document.getElementsByName('z71')[0].checked;
	if (test == true) {
		t71 = "yes";
	}
	if (t71 == null) {
		var test1 = document.getElementsByName('z71')[1].checked;
		if ( test1 == true) {
			t71 = "no";
		}
	}
	test = document.getElementsByName('z72')[0].checked;
	if (test == true) {
		t72 = "yes";
	}
	if (t72 == null) {
		var test1 = document.getElementsByName('z72')[1].checked;
		if ( test1 == true) {
			t72 = "no";
		}
	}
	test = document.getElementsByName('z73')[0].checked;
	if (test == true) {
		t73 = "yes";
	}
	if (t73 == null) {
		var test1 = document.getElementsByName('z73')[1].checked;
		if ( test1 == true) {
			t73 = "no";
		}
	}
	test = document.getElementsByName('z74')[0].checked;
	if (test == true) {
		t74 = "yes";
	}
	if (t74 == null) {
		var test1 = document.getElementsByName('z74')[1].checked;
		if ( test1 == true) {
			t74 = "no";
		}
	}
	
	test = document.getElementsByName('z75')[0].checked;
	if (test == true) {
		t75 = "yes";
	}
	if (t75 == null) {
		var test1 = document.getElementsByName('z75')[1].checked;
		if ( test1 == true) {
			t75 = "no";
		}
	}
	
	test = document.getElementsByName('z76')[0].checked;
	if (test == true) {
		t76 = "yes";
	}
	if (t76 == null) {
		var test1 = document.getElementsByName('z76')[1].checked;
		if ( test1 == true) {
			t76 = "no";
		}
	}
	test = document.getElementsByName('z77')[0].checked;
	if (test == true) {
		t77 = "yes";
	}
	if (t77 == null) {
		var test1 = document.getElementsByName('z77')[1].checked;
		if ( test1 == true) {
			t77 = "no";
		}
	}
	test = document.getElementsByName('z78')[0].checked;
	if (test == true) {
		t78 = "yes";
	}
	if (t78 == null) {
		var test1 = document.getElementsByName('z78')[1].checked;
		if ( test1 == true) {
			t78 = "no";
		}
	}
	test = document.getElementsByName('z79')[0].checked;
	if (test == true) {
		t79 = "yes";
	}
	if (t79 == null) {
		var test1 = document.getElementsByName('z79')[1].checked;
		if ( test1 == true) {
			t79 = "no";
		}
	}

	$.ajax({
        url: 'updateGeneColony.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneColonyB_geneName").val(),
        	type: $("#updateGeneColonyB_type").val(),
        	esize: $("#updateGeneColonyB_esize").val(),
        	date1: $("#updateGeneColonyB_date1").val(),
        	date2: $("#updateGeneColonyB_date2").val(),
        	date3: $("#updateGeneColonyB_date3").val(),
        	z60: t60,
        	z61: t61,
        	z62: t62,
        	z63: t63,
        	z64: t64,
        	z65: t65,
        	z66: t66,
        	z67: t67,
        	z68: t68,
        	z69: t69,
        	z70: t70,
        	z71: t71,
        	z72: t72,
        	z73: t73,
        	z74: t74,
        	z75: t75,
        	z76: t76,
        	z77: t77,
        	z78: t78,
        	z79: t79
        	},
        timeout: 2000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The ColonyPRC B form have been saved!");
            //$('#colonyPCRADiv').show();
			//$('#colonyPCRADiv').html(data);	       
        }
    });  
};

var viewMinipreB = function(){
	//alert("This is view MinipreB");//should be here
  // or use $.post
    $.ajax({
        url: 'viewGeneMinipre.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewGeneMinipreB_geneName").val(),
        	type: $("#viewGeneMinipreB_type").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
            $('#minipreBDiv').show();
			$('#minipreBDiv').html(data);	       
        }
    });  
};

var updateMiniprepB = function(){
	//alert(1);//should be here
	var test = document.getElementById('updateGeneMiniprepB_seqConfirmedYes').checked;
	var rs = null;
	if (test == true) {
		rs = "Yes";
	}
	if (rs == null) {
		var test1 = document.getElementById('updateGeneMiniprepB_seqConfirmedNo').checked;
		if ( test1 == true) {
			rs = "No";
		}
	}
	var d = $("#updateGeneMiniprepB_recordDate").val();
	var cl = $("#updateGeneMiniprepB_colony").val();
	var m = $("#updateGeneMiniprepB_ml").val();
	var r = rs;
	var c = $("#updateGeneMiniprepB_comments").val();
	if (d == "") {
		alert("Please fill in the Date");
		return;
	}
	if (cl == "") {
		alert("Please fill in the Colony");
		return;
	}
	if (m == "") {
		alert("Please fill in the [ng/ul]");
		return;
	}
	if (r == null) {
		alert("Please Select the Sequence Confirmed");
		return;
	}
	if (c.length > 999) {
		alert("Please limit the comment in 999 characters");
		return;
	}
    $.ajax({
        url: 'updateGeneMiniprep.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#updateGeneMiniprepB_geneName").val(),
        	type: $("#updateGeneMiniprepB_type").val(),
        	recordDate: $("#updateGeneMiniprepB_recordDate").val(),
        	colony: $("#updateGeneMiniprepB_colony").val(),
        	ml: $("#updateGeneMiniprepB_ml").val(),
        	seqConfirmed: rs,
        	comments: $("#updateGeneMiniprepB_comments").val()
        	},
        timeout: 1000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Miniprep B form have been saved!");
            //$('#minipreADiv').show();
			//$('#minipreADiv').html(data);	       
        }
    });  
};

var viewQuickChangeC = function(){
	  // or use $.post
	    $.ajax({
	        url: 'viewGeneQuickChange.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#viewGeneQuickChangeC_geneName").val(),
	        	type: $("#viewGeneQuickChangeC_type").val()
	        	},
	        timeout: 1000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	//alert("The comment has been saved!");
	            $('#quickchangeCDiv').show();
				$('#quickchangeCDiv').html(data);	       
	        }
	    });  
	};

	var updateQuickChangeC = function(){
		//alert(1);//should be here
		var d = $("#updateGeneQuickChangeC_recordDate").val();
		var c = $("#updateGeneQuickChangeC_comments").val();
		if (d == "") {
			alert("Please fill in the Date");
			return;
		}
		if (c.length > 999) {
			alert("Please limit the comment in 999 characters");
			return;
		}
	    $.ajax({
	        url: 'updateGeneQuickChange.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#updateGeneQuickChangeC_geneName").val(),
	        	type: $("#updateGeneQuickChangeC_type").val(),
	        	recordDate: $("#updateGeneQuickChangeC_recordDate").val(),
	        	comments: $("#updateGeneQuickChangeC_comments").val()
	        	},
	        timeout: 1000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	alert("The QuickChange C form have been saved!");
	            //$('#minipreADiv').show();
				//$('#minipreADiv').html(data);	       
	        }
	    });  
	};

var viewColonyC = function(){
		//alert("This is view ColonyB");//should be here
		//var url = 'viewGeneColony.action'; //action relative path
	  // or use $.post
	    $.ajax({
	        url: 'viewGeneColony.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#viewGeneColonyC_geneName").val(),
	        	type: $("#viewGeneColonyC_type").val()
	        	},
	        timeout: 1000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	//alert("The comment has been saved!");
	            $('#colonyPCRCDiv').show();
				$('#colonyPCRCDiv').html(data);	       
	        }
	    });  
	};

	
	var updateColonyC = function(){
		//alert(1);//should be here
	  // or use $.post
		var test = null; 
		var t80 = null;
		var t81 = null;
		var t82 = null;
		var t83 = null;
		var t84 = null;
		var t85 = null;
		var t86 = null;
		var t87 = null;
		var t88 = null;
		var t89 = null;
		var t90 = null;
		var t91 = null;
		var t92 = null;
		var t93 = null;
		var t94 = null;
		var t95 = null;
		var t96 = null;
		var t97 = null;
		var t98 = null;
		var t99 = null;
		
		test = document.getElementsByName('z80')[0].checked;
		if (test == true) {
			t80 = "yes";
		}
		if (t80 == null) {
			var test1 = document.getElementsByName('z80')[1].checked;
			if ( test1 == true) {
				t80 = "no";
			}
		}
		test = document.getElementsByName('z81')[0].checked;
		if (test == true) {
			t81 = "yes";
		}
		if (t81 == null) {
			var test1 = document.getElementsByName('z81')[1].checked;
			if ( test1 == true) {
				t81 = "no";
			}
		}
		test = document.getElementsByName('z82')[0].checked;
		if (test == true) {
			t82 = "yes";
		}
		if (t82 == null) {
			var test1 = document.getElementsByName('z82')[1].checked;
			if ( test1 == true) {
				t82 = "no";
			}
		}
		test = document.getElementsByName('z83')[0].checked;
		if (test == true) {
			t83 = "yes";
		}
		if (t83 == null) {
			var test1 = document.getElementsByName('z83')[1].checked;
			if ( test1 == true) {
				t83 = "no";
			}
		}
		test = document.getElementsByName('z84')[0].checked;
		if (test == true) {
			t84 = "yes";
		}
		if (t84 == null) {
			var test1 = document.getElementsByName('z84')[1].checked;
			if ( test1 == true) {
				t84 = "no";
			}
		}
		
		test = document.getElementsByName('z85')[0].checked;
		if (test == true) {
			t85 = "yes";
		}
		if (t85 == null) {
			var test1 = document.getElementsByName('z85')[1].checked;
			if ( test1 == true) {
				t85 = "no";
			}
		}
		
		test = document.getElementsByName('z86')[0].checked;
		if (test == true) {
			t86 = "yes";
		}
		if (t86 == null) {
			var test1 = document.getElementsByName('z86')[1].checked;
			if ( test1 == true) {
				t86 = "no";
			}
		}
		test = document.getElementsByName('z87')[0].checked;
		if (test == true) {
			t87 = "yes";
		}
		if (t87 == null) {
			var test1 = document.getElementsByName('z87')[1].checked;
			if ( test1 == true) {
				t87 = "no";
			}
		}
		test = document.getElementsByName('z88')[0].checked;
		if (test == true) {
			t88 = "yes";
		}
		if (t88 == null) {
			var test1 = document.getElementsByName('z88')[1].checked;
			if ( test1 == true) {
				t88 = "no";
			}
		}
		test = document.getElementsByName('z89')[0].checked;
		if (test == true) {
			t89 = "yes";
		}
		if (t89 == null) {
			var test1 = document.getElementsByName('z89')[1].checked;
			if ( test1 == true) {
				t89 = "no";
			}
		}
		test = document.getElementsByName('z90')[0].checked;
		if (test == true) {
			t90 = "yes";
		}
		if (t90 == null) {
			var test1 = document.getElementsByName('z90')[1].checked;
			if ( test1 == true) {
				t90 = "no";
			}
		}
		test = document.getElementsByName('z91')[0].checked;
		if (test == true) {
			t91 = "yes";
		}
		if (t91 == null) {
			var test1 = document.getElementsByName('z91')[1].checked;
			if ( test1 == true) {
				t91 = "no";
			}
		}
		test = document.getElementsByName('z92')[0].checked;
		if (test == true) {
			t92 = "yes";
		}
		if (t92 == null) {
			var test1 = document.getElementsByName('z92')[1].checked;
			if ( test1 == true) {
				t92 = "no";
			}
		}
		test = document.getElementsByName('z93')[0].checked;
		if (test == true) {
			t93 = "yes";
		}
		if (t93 == null) {
			var test1 = document.getElementsByName('z93')[1].checked;
			if ( test1 == true) {
				t93 = "no";
			}
		}
		test = document.getElementsByName('z94')[0].checked;
		if (test == true) {
			t94 = "yes";
		}
		if (t94 == null) {
			var test1 = document.getElementsByName('z94')[1].checked;
			if ( test1 == true) {
				t94 = "no";
			}
		}
		
		test = document.getElementsByName('z95')[0].checked;
		if (test == true) {
			t95 = "yes";
		}
		if (t95 == null) {
			var test1 = document.getElementsByName('z95')[1].checked;
			if ( test1 == true) {
				t95 = "no";
			}
		}
		
		test = document.getElementsByName('z96')[0].checked;
		if (test == true) {
			t96 = "yes";
		}
		if (t96 == null) {
			var test1 = document.getElementsByName('z96')[1].checked;
			if ( test1 == true) {
				t96 = "no";
			}
		}
		test = document.getElementsByName('z97')[0].checked;
		if (test == true) {
			t97 = "yes";
		}
		if (t97 == null) {
			var test1 = document.getElementsByName('z97')[1].checked;
			if ( test1 == true) {
				t97 = "no";
			}
		}
		test = document.getElementsByName('z98')[0].checked;
		if (test == true) {
			t98 = "yes";
		}
		if (t98 == null) {
			var test1 = document.getElementsByName('z98')[1].checked;
			if ( test1 == true) {
				t98 = "no";
			}
		}
		test = document.getElementsByName('z99')[0].checked;
		if (test == true) {
			t99 = "yes";
		}
		if (t99 == null) {
			var test1 = document.getElementsByName('z99')[1].checked;
			if ( test1 == true) {
				t99 = "no";
			}
		}

		$.ajax({
	        url: 'updateGeneColony.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#updateGeneColonyC_geneName").val(),
	        	type: $("#updateGeneColonyC_type").val(),
	        	esize: $("#updateGeneColonyC_esize").val(),
	        	date1: $("#updateGeneColonyC_date1").val(),
	        	date2: $("#updateGeneColonyC_date2").val(),
	        	date3: $("#updateGeneColonyC_date3").val(),
	        	pno1: $("#updateGeneColonyC_pno1").val(),
	        	pno2:$("#updateGeneColonyC_pno2").val(),
	        	z80: t80,
	        	z81: t81,
	        	z82: t82,
	        	z83: t83,
	        	z84: t84,
	        	z85: t85,
	        	z86: t86,
	        	z87: t87,
	        	z88: t88,
	        	z89: t89,
	        	z90: t90,
	        	z91: t91,
	        	z92: t92,
	        	z93: t93,
	        	z94: t94,
	        	z95: t95,
	        	z96: t96,
	        	z97: t97,
	        	z98: t98,
	        	z99: t99
	        	},
	        timeout: 2000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	alert("The ColonyPRC C form have been saved!");
	            //$('#colonyPCRADiv').show();
				//$('#colonyPCRADiv').html(data);	       
	        }
	    });  
	};
	
	var viewMinipreC = function(){
		//alert("This is view MinipreB");//should be here
	  // or use $.post
	    $.ajax({
	        url: 'viewGeneMinipre.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#viewGeneMinipreC_geneName").val(),
	        	type: $("#viewGeneMinipreC_type").val()
	        	},
	        timeout: 1000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	//alert("The comment has been saved!");
	            $('#minipreCDiv').show();
				$('#minipreCDiv').html(data);	       
	        }
	    });  
	};
	
	var updateMiniprepC = function(){
		//alert(1);//should be here
		var test = document.getElementById('updateGeneMiniprepC_seqConfirmedYes').checked;
		var rs = null;
		if (test == true) {
			rs = "Yes";
		}
		if (rs == null) {
			var test1 = document.getElementById('updateGeneMiniprepC_seqConfirmedNo').checked;
			if ( test1 == true) {
				rs = "No";
			}
		}
		var d = $("#updateGeneMiniprepC_recordDate").val();
		var cl = $("#updateGeneMiniprepC_colony").val();
		var m = $("#updateGeneMiniprepC_ml").val();
		var r = rs;
		var c = $("#updateGeneMiniprepC_comments").val();
		if (d == "") {
			alert("Please fill in the Date");
			return;
		}
		if (cl == "") {
			alert("Please fill in the Colony");
			return;
		}
		if (m == "") {
			alert("Please fill in the [ng/ul]");
			return;
		}
		if (r == null) {
			alert("Please Select the Sequence Confirmed");
			return;
		}
		if (c.length > 999) {
			alert("Please limit the comment in 999 characters");
			return;
		}
	    $.ajax({
	        url: 'updateGeneMiniprep.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#updateGeneMiniprepC_geneName").val(),
	        	type: $("#updateGeneMiniprepC_type").val(),
	        	recordDate: $("#updateGeneMiniprepC_recordDate").val(),
	        	colony: $("#updateGeneMiniprepC_colony").val(),
	        	ml: $("#updateGeneMiniprepC_ml").val(),
	        	seqConfirmed: rs,
	        	comments: $("#updateGeneMiniprepC_comments").val()
	        	},
	        timeout: 1000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	alert("The Miniprep C form have been saved!");
	            //$('#minipreADiv').show();
				//$('#minipreADiv').html(data);	       
	        }
	    });  
	};
	
	var viewQuickChangeD = function(){
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneQuickChange.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneQuickChangeD_geneName").val(),
		        	type: $("#viewGeneQuickChangeD_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#quickchangeDDiv').show();
					$('#quickchangeDDiv').html(data);	       
		        }
		    });  
		};
	
	var updateQuickChangeD = function(){
			//alert(1);//should be here
		var d = $("#updateGeneQuickChangeD_recordDate").val();
		var c = $("#updateGeneQuickChangeD_comments").val();
		if (d == "") {
			alert("Please fill in the Date");
			return;
		}
		if (c.length > 999) {
			alert("Please limit the comment in 999 characters");
			return;
		}
		    $.ajax({
		        url: 'updateGeneQuickChange.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneQuickChangeD_geneName").val(),
		        	type: $("#updateGeneQuickChangeD_type").val(),
		        	recordDate: $("#updateGeneQuickChangeD_recordDate").val(),
		        	comments: $("#updateGeneQuickChangeD_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The QuickChange D form have been saved!");
		            //$('#minipreADiv').show();
					//$('#minipreADiv').html(data);	       
		        }
		    });  
		};

	var viewColonyD = function(){
			//alert("This is view ColonyB");//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneColony.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneColonyD_geneName").val(),
		        	type: $("#viewGeneColonyD_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#colonyPCRDDiv').show();
					$('#colonyPCRDDiv').html(data);	       
		        }
		    });  
		};
	
		var updateColonyD = function(){
			//alert(1);//should be here
		  // or use $.post
			var test = null; 
			var t100 = null;
			var t101 = null;
			var t102 = null;
			var t103 = null;
			var t104 = null;
			var t105 = null;
			var t106 = null;
			var t107 = null;
			var t108 = null;
			var t109 = null;
			var t110 = null;
			var t111 = null;
			var t112 = null;
			var t113 = null;
			var t114 = null;
			var t115 = null;
			var t116 = null;
			var t117 = null;
			var t118 = null;
			var t119 = null;
			
			test = document.getElementsByName('z100')[0].checked;
			if (test == true) {
				t100 = "yes";
			}
			if (t100 == null) {
				var test1 = document.getElementsByName('z100')[1].checked;
				if ( test1 == true) {
					t100 = "no";
				}
			}
			test = document.getElementsByName('z101')[0].checked;
			if (test == true) {
				t101 = "yes";
			}
			if (t101 == null) {
				var test1 = document.getElementsByName('z101')[1].checked;
				if ( test1 == true) {
					t101 = "no";
				}
			}
			test = document.getElementsByName('z102')[0].checked;
			if (test == true) {
				t102 = "yes";
			}
			if (t102 == null) {
				var test1 = document.getElementsByName('z102')[1].checked;
				if ( test1 == true) {
					t102 = "no";
				}
			}
			test = document.getElementsByName('z103')[0].checked;
			if (test == true) {
				t103 = "yes";
			}
			if (t103 == null) {
				var test1 = document.getElementsByName('z103')[1].checked;
				if ( test1 == true) {
					t103 = "no";
				}
			}
			test = document.getElementsByName('z104')[0].checked;
			if (test == true) {
				t104 = "yes";
			}
			if (t104 == null) {
				var test1 = document.getElementsByName('z104')[1].checked;
				if ( test1 == true) {
					t104 = "no";
				}
			}
			
			test = document.getElementsByName('z105')[0].checked;
			if (test == true) {
				t105 = "yes";
			}
			if (t105 == null) {
				var test1 = document.getElementsByName('z105')[1].checked;
				if ( test1 == true) {
					t105 = "no";
				}
			}
			
			test = document.getElementsByName('z106')[0].checked;
			if (test == true) {
				t106 = "yes";
			}
			if (t106 == null) {
				var test1 = document.getElementsByName('z106')[1].checked;
				if ( test1 == true) {
					t106 = "no";
				}
			}
			test = document.getElementsByName('z107')[0].checked;
			if (test == true) {
				t107 = "yes";
			}
			if (t107 == null) {
				var test1 = document.getElementsByName('z107')[1].checked;
				if ( test1 == true) {
					t107 = "no";
				}
			}
			test = document.getElementsByName('z108')[0].checked;
			if (test == true) {
				t108 = "yes";
			}
			if (t108 == null) {
				var test1 = document.getElementsByName('z108')[1].checked;
				if ( test1 == true) {
					t108 = "no";
				}
			}
			test = document.getElementsByName('z109')[0].checked;
			if (test == true) {
				t109 = "yes";
			}
			if (t109 == null) {
				var test1 = document.getElementsByName('z109')[1].checked;
				if ( test1 == true) {
					t109 = "no";
				}
			}
			test = document.getElementsByName('z110')[0].checked;
			if (test == true) {
				t110 = "yes";
			}
			if (t110 == null) {
				var test1 = document.getElementsByName('z110')[1].checked;
				if ( test1 == true) {
					t110 = "no";
				}
			}
			test = document.getElementsByName('z111')[0].checked;
			if (test == true) {
				t111 = "yes";
			}
			if (t111 == null) {
				var test1 = document.getElementsByName('z111')[1].checked;
				if ( test1 == true) {
					t111 = "no";
				}
			}
			test = document.getElementsByName('z112')[0].checked;
			if (test == true) {
				t112 = "yes";
			}
			if (t112 == null) {
				var test1 = document.getElementsByName('z112')[1].checked;
				if ( test1 == true) {
					t112 = "no";
				}
			}
			test = document.getElementsByName('z113')[0].checked;
			if (test == true) {
				t113 = "yes";
			}
			if (t113 == null) {
				var test1 = document.getElementsByName('z113')[1].checked;
				if ( test1 == true) {
					t113 = "no";
				}
			}
			test = document.getElementsByName('z114')[0].checked;
			if (test == true) {
				t114 = "yes";
			}
			if (t114 == null) {
				var test1 = document.getElementsByName('z114')[1].checked;
				if ( test1 == true) {
					t114 = "no";
				}
			}
			
			test = document.getElementsByName('z115')[0].checked;
			if (test == true) {
				t115 = "yes";
			}
			if (t115 == null) {
				var test1 = document.getElementsByName('z115')[1].checked;
				if ( test1 == true) {
					t115 = "no";
				}
			}
			
			test = document.getElementsByName('z116')[0].checked;
			if (test == true) {
				t116 = "yes";
			}
			if (t116 == null) {
				var test1 = document.getElementsByName('z116')[1].checked;
				if ( test1 == true) {
					t116 = "no";
				}
			}
			test = document.getElementsByName('z117')[0].checked;
			if (test == true) {
				t117 = "yes";
			}
			if (t117 == null) {
				var test1 = document.getElementsByName('z117')[1].checked;
				if ( test1 == true) {
					t117 = "no";
				}
			}
			test = document.getElementsByName('z118')[0].checked;
			if (test == true) {
				t118 = "yes";
			}
			if (t118 == null) {
				var test1 = document.getElementsByName('z118')[1].checked;
				if ( test1 == true) {
					t118 = "no";
				}
			}
			test = document.getElementsByName('z119')[0].checked;
			if (test == true) {
				t119 = "yes";
			}
			if (t119 == null) {
				var test1 = document.getElementsByName('z119')[1].checked;
				if ( test1 == true) {
					t119 = "no";
				}
			}

			$.ajax({
		        url: 'updateGeneColony.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneColonyD_geneName").val(),
		        	type: $("#updateGeneColonyD_type").val(),
		        	esize: $("#updateGeneColonyD_esize").val(),
		        	date1: $("#updateGeneColonyD_date1").val(),
		        	date2: $("#updateGeneColonyD_date2").val(),
		        	date3: $("#updateGeneColonyD_date3").val(),
		        	pno1: $("#updateGeneColonyD_pno1").val(),
		        	pno2:$("#updateGeneColonyD_pno2").val(),
		        	z100: t100,
		        	z101: t101,
		        	z102: t102,
		        	z103: t103,
		        	z104: t104,
		        	z105: t105,
		        	z106: t106,
		        	z107: t107,
		        	z108: t108,
		        	z109: t109,
		        	z110: t110,
		        	z111: t111,
		        	z112: t112,
		        	z113: t113,
		        	z114: t114,
		        	z115: t115,
		        	z116: t116,
		        	z117: t117,
		        	z118: t118,
		        	z119: t119
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The ColonyPRC D form have been saved!");
		            //$('#colonyPCRADiv').show();
					//$('#colonyPCRADiv').html(data);	       
		        }
		    });  
		};
		
		var viewMinipreD = function(){
			//alert("This is view MinipreB");//should be here
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneMinipre.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneMinipreD_geneName").val(),
		        	type: $("#viewGeneMinipreD_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#minipreDDiv').show();
					$('#minipreDDiv').html(data);	       
		        }
		    });  
		};
		
		var updateMiniprepD = function(){
			//alert(1);//should be here
			var test = document.getElementById('updateGeneMiniprepD_seqConfirmedYes').checked;
			var rs = null;
			if (test == true) {
				rs = "Yes";
			}
			if (rs == null) {
				var test1 = document.getElementById('updateGeneMiniprepD_seqConfirmedNo').checked;
				if ( test1 == true) {
					rs = "No";
				}
			}
			var d = $("#updateGeneMiniprepD_recordDate").val();
			var cl = $("#updateGeneMiniprepD_colony").val();
			var m = $("#updateGeneMiniprepD_ml").val();
			var r = rs;
			var c = $("#updateGeneMiniprepD_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (cl == "") {
				alert("Please fill in the Colony");
				return;
			}
			if (m == "") {
				alert("Please fill in the [ng/ul]");
				return;
			}
			if (r == null) {
				alert("Please Select the Sequence Confirmed");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
		    $.ajax({
		        url: 'updateGeneMiniprep.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneMiniprepD_geneName").val(),
		        	type: $("#updateGeneMiniprepD_type").val(),
		        	recordDate: $("#updateGeneMiniprepD_recordDate").val(),
		        	colony: $("#updateGeneMiniprepD_colony").val(),
		        	ml: $("#updateGeneMiniprepD_ml").val(),
		        	seqConfirmed: rs,
		        	comments: $("#updateGeneMiniprepD_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Miniprep D form have been saved!");
		            //$('#minipreADiv').show();
					//$('#minipreADiv').html(data);	       
		        }
		    });  
		};
	
		var viewTS559B = function(){
			//alert("This is view ColonyB");//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneTS559.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneTS559B_geneName").val(),
		        	type: $("#viewGeneTS559B_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#ts559BDiv').show();
					$('#ts559BDiv').html(data);	       
		        }
		    });  
		};
		
		var updateTS559B = function(){
			var d = $("#updateGeneTS559B_recordDate").val();
			var c = $("#updateGeneTS559B_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
			//alert(1);//should be here
		    $.ajax({
		        url: 'updateGeneTS559.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneTS559B_geneName").val(),
		        	type: $("#updateGeneTS559B_type").val(),
		        	recordDate: $("#updateGeneTS559B_recordDate").val(),
		        	comments: $("#updateGeneTS559B_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The B to TS559 form have been saved!");      
		        }
		    });  
		};
		
		
		var viewRespottedB = function(){
		  //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneRespotted.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneRespottedB_geneName").val(),
		        	type: $("#viewGeneRespottedB_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert(2);
		            $('#geneRespottedDiv').show();
					$('#geneRespottedDiv').html(data);	       
		        }
		    });  
		};
		
		var updateRespottedB = function(){
			//alert(1);//should be here
			var d = $("#updateGeneRespottedB_recordDate").val();
			var c = $("#updateGeneRespottedB_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
		    $.ajax({
		        url: 'updateGeneRespotted.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneRespottedB_geneName").val(),
		        	type: $("#updateGeneRespottedB_type").val(),
		        	recordDate: $("#updateGeneRespottedB_recordDate").val(),
		        	comments: $("#updateGeneRespottedB_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The B Respotted form have been saved!");      
		        }
		    });  
		};
		
		var viewPrepIntermediatesB = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePrepIntermediates.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePrepIntermediatesB_geneName").val(),
		        	type: $("#viewGenePrepIntermediatesB_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePrepIntermediatesBDiv').show();
					$('#genePrepIntermediatesBDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePrepIntermeidatesB = function(){
			//alert(1);//should be here
		  // or use $.post
			var ch1 = "";
			var ch2 = "";
			
			test = document.getElementsByName('x160')[0].checked;
			if (test == true) {
				ch1 += "160Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x160')[1].checked;
					if ( test1 == true) {
						ch1 += "160N";
					}
					else {
						ch1 += "160X";
					}
				}
			}
			test = document.getElementsByName('y160')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y160')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z160')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z160')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x161')[0].checked;
			if (test == true) {
				ch1 += "161Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x161')[1].checked;
					if ( test1 == true) {
						ch1 += "161N";
					}
					else {
						ch1 += "161X";
					}
				}
			}
			test = document.getElementsByName('y161')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y161')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z161')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z161')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x162')[0].checked;
			if (test == true) {
				ch1 += "162Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x162')[1].checked;
					if ( test1 == true) {
						ch1 += "162N";
					}
					else {
						ch1 += "162X";
					}
				}
			}
			test = document.getElementsByName('y162')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y162')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z162')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z162')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x163')[0].checked;
			if (test == true) {
				ch1 += "163Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x163')[1].checked;
					if ( test1 == true) {
						ch1 += "163N";
					}
					else {
						ch1 += "163X";
					}
				}
			}
			test = document.getElementsByName('y163')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y163')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z163')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z163')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x164')[0].checked;
			if (test == true) {
				ch1 += "164Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x164')[1].checked;
					if ( test1 == true) {
						ch1 += "164N";
					}
					else {
						ch1 += "164X";
					}
				}
			}
			test = document.getElementsByName('y164')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y164')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z164')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z164')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x165')[0].checked;
			if (test == true) {
				ch1 += "165Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x165')[1].checked;
					if ( test1 == true) {
						ch1 += "165N";
					}
					else {
						ch1 += "165X";
					}
				}
			}
			test = document.getElementsByName('y165')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y165')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z165')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z165')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x166')[0].checked;
			if (test == true) {
				ch1 += "166Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x166')[1].checked;
					if ( test1 == true) {
						ch1 += "166N";
					}
					else {
						ch1 += "166X";
					}
				}
			}
			test = document.getElementsByName('y166')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y166')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z166')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z166')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x167')[0].checked;
			if (test == true) {
				ch1 += "167Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x167')[1].checked;
					if ( test1 == true) {
						ch1 += "167N";
					}
					else {
						ch1 += "167X";
					}
				}
			}
			test = document.getElementsByName('y167')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y167')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z167')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z167')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x168')[0].checked;
			if (test == true) {
				ch1 += "168Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x168')[1].checked;
					if ( test1 == true) {
						ch1 += "168N";
					}
					else {
						ch1 += "168X";
					}
				}
			}
			test = document.getElementsByName('y168')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y168')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z168')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z168')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x169')[0].checked;
			if (test == true) {
				ch1 += "169Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x169')[1].checked;
					if ( test1 == true) {
						ch1 += "169N";
					}
					else {
						ch1 += "169X";
					}
				}
			}
			test = document.getElementsByName('y169')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y169')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z169')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z169')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x170')[0].checked;
			if (test == true) {
				ch2 += "170Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x170')[1].checked;
					if ( test1 == true) {
						ch2 += "170N";
					}
					else {
						ch2 += "170X";
					}
				}
			}
			test = document.getElementsByName('y170')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y170')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z170')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z170')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x171')[0].checked;
			if (test == true) {
				ch2 += "171Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x171')[1].checked;
					if ( test1 == true) {
						ch2 += "171N";
					}
					else {
						ch2 += "171X";
					}
				}
			}
			test = document.getElementsByName('y171')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y171')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z171')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z171')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x172')[0].checked;
			if (test == true) {
				ch2 += "172Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x172')[1].checked;
					if ( test1 == true) {
						ch2 += "172N";
					}
					else {
						ch2 += "172X";
					}
				}
			}
			test = document.getElementsByName('y172')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y172')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z172')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z172')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x173')[0].checked;
			if (test == true) {
				ch2 += "173Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x173')[1].checked;
					if ( test1 == true) {
						ch2 += "173N";
					}
					else {
						ch2 += "173X";
					}
				}
			}
			test = document.getElementsByName('y173')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y173')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z173')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z173')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x174')[0].checked;
			if (test == true) {
				ch2 += "174Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x174')[1].checked;
					if ( test1 == true) {
						ch2 += "174N";
					}
					else {
						ch2 += "174X";
					}
				}
			}
			test = document.getElementsByName('y174')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y174')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z174')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z174')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x175')[0].checked;
			if (test == true) {
				ch2 += "175Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x175')[1].checked;
					if ( test1 == true) {
						ch2 += "175N";
					}
					else {
						ch2 += "175X";
					}
				}
			}
			test = document.getElementsByName('y175')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y175')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z175')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z175')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x176')[0].checked;
			if (test == true) {
				ch2 += "176Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x176')[1].checked;
					if ( test1 == true) {
						ch2 += "176N";
					}
					else {
						ch2 += "176X";
					}
				}
			}
			test = document.getElementsByName('y176')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y176')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z176')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z176')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x177')[0].checked;
			if (test == true) {
				ch2 += "177Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x177')[1].checked;
					if ( test1 == true) {
						ch2 += "177N";
					}
					else {
						ch2 += "177X";
					}
				}
			}
			test = document.getElementsByName('y177')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y177')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z177')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z177')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x178')[0].checked;
			if (test == true) {
				ch2 += "178Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x178')[1].checked;
					if ( test1 == true) {
						ch2 += "178N";
					}
					else {
						ch2 += "178X";
					}
				}
			}
			test = document.getElementsByName('y178')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y178')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z178')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z178')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x179')[0].checked;
			if (test == true) {
				ch2 += "179Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x179')[1].checked;
					if ( test1 == true) {
						ch2 += "179N";
					}
					else {
						ch2 += "179X";
					}
				}
			}
			test = document.getElementsByName('y179')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y179')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z179')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z179')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}

			$.ajax({
		        url: 'updateGenePrepIntermediates.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePrepIntermeidatesB_geneName").val(),
		        	type: $("#updateGenePrepIntermeidatesB_type").val(),
		        	date1: $("#updateGenePrepIntermeidatesB_date1").val(),
		        	date2: $("#updateGenePrepIntermeidatesB_date2").val(),
		        	x1: $("#updateGenePrepIntermeidatesB_x1").val(),
		        	x2:$("#updateGenePrepIntermeidatesB_x2").val(),
		        	y1: $("#updateGenePrepIntermeidatesB_y1").val(),
		        	y2:$("#updateGenePrepIntermeidatesB_y2").val(),
		        	z1: $("#updateGenePrepIntermeidatesB_z1").val(),
		        	z2:$("#updateGenePrepIntermeidatesB_z2").val(),
		        	checked: ch1,
		        	repeatChecked: ch2
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Prep from Intermediates (B) form have been saved!");      
		        }
		    });  
		};
		
		var viewPlate6MPB = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePlate6MP.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePlate6MPB_geneName").val(),
		        	type: $("#viewGenePlate6MPB_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePlate6MPBDiv').show();
					$('#genePlate6MPBDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePlate6MPB = function(){
			//alert(1);//should be here
			var test = document.getElementById('updateGenePlate6MPB_intermediate1').checked;
			var rs = null;
			if (test == true) {
				rs = "1";
			}
			if (rs == null) {
				var test1 = document.getElementById('updateGenePlate6MPB_intermediate2').checked;
				if ( test1 == true) {
					rs = "2";
				}
			}
		    $.ajax({
		        url: 'updateGenePlate6MP.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePlate6MPB_geneName").val(),
		        	type: $("#updateGenePlate6MPB_type").val(),
		        	recordDate: $("#updateGenePlate6MPB_recordDate").val(),
		        	strain: $("#updateGenePlate6MPB_strain").val(),
		        	intermediate: rs,
		        	comments: $("#updateGenePlate6MPB_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Plate 6 MP (B) form have been saved!");       
		        }
		    });  
		};
		
		var viewPrepFinalsB = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePrepFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePrepFinalsB_geneName").val(),
		        	type: $("#viewGenePrepFinalsB_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePrepFinalsBDiv').show();
					$('#genePrepFinalsBDiv').html(data);	       
		        }
		    });  
		};
		
		
		var updatePrepFinalsB = function(){
			//alert(1);//should be here
		  // or use $.post
			var ch1 = ""; 
			var ch2 = "";
			var ch3 = "";
			
			var test = document.getElementsByName('z180')[0].checked;
			if (test == true) {
				ch1 += "180Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z180')[1].checked;
					if ( test1 == true) {
						ch1 += "180N";
					}
					else {
						ch1 += "180X";
					}
				}
			}
			var test = document.getElementsByName('z181')[0].checked;
			if (test == true) {
				ch1 += "181Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z181')[1].checked;
					if ( test1 == true) {
						ch1 += "181N";
					}
					else {
						ch1 += "181X";
					}
				}
			}
			var test = document.getElementsByName('z182')[0].checked;
			if (test == true) {
				ch1 += "182Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z182')[1].checked;
					if ( test1 == true) {
						ch1 += "182N";
					}
					else {
						ch1 += "182X";
					}
				}
			}
			var test = document.getElementsByName('z183')[0].checked;
			if (test == true) {
				ch1 += "183Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z183')[1].checked;
					if ( test1 == true) {
						ch1 += "183N";
					}
					else {
						ch1 += "183X";
					}
				}
			}
			var test = document.getElementsByName('z184')[0].checked;
			if (test == true) {
				ch1 += "184Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z184')[1].checked;
					if ( test1 == true) {
						ch1 += "184N";
					}
					else {
						ch1 += "184X";
					}
				}
			}
			var test = document.getElementsByName('z185')[0].checked;
			if (test == true) {
				ch1 += "185Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z185')[1].checked;
					if ( test1 == true) {
						ch1 += "185N";
					}
					else {
						ch1 += "185X";
					}
				}
			}
			var test = document.getElementsByName('z186')[0].checked;
			if (test == true) {
				ch1 += "186Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z186')[1].checked;
					if ( test1 == true) {
						ch1 += "186N";
					}
					else {
						ch1 += "186X";
					}
				}
			}
			var test = document.getElementsByName('z187')[0].checked;
			if (test == true) {
				ch1 += "187Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z187')[1].checked;
					if ( test1 == true) {
						ch1 += "187N";
					}
					else {
						ch1 += "187X";
					}
				}
			}
			var test = document.getElementsByName('z188')[0].checked;
			if (test == true) {
				ch1 += "188Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z188')[1].checked;
					if ( test1 == true) {
						ch1 += "188N";
					}
					else {
						ch1 += "188X";
					}
				}
			}
			var test = document.getElementsByName('z189')[0].checked;
			if (test == true) {
				ch1 += "189Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z189')[1].checked;
					if ( test1 == true) {
						ch1 += "189N";
					}
					else {
						ch1 += "189X";
					}
				}
			}
			
			var test = document.getElementsByName('z190')[0].checked;
			if (test == true) {
				ch2 += "190Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z190')[1].checked;
					if ( test1 == true) {
						ch2 += "190N";
					}
					else {
						ch2 += "190X";
					}
				}
			}
			var test = document.getElementsByName('z191')[0].checked;
			if (test == true) {
				ch2 += "191Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z191')[1].checked;
					if ( test1 == true) {
						ch2 += "191N";
					}
					else {
						ch2 += "191X";
					}
				}
			}
			var test = document.getElementsByName('z192')[0].checked;
			if (test == true) {
				ch2 += "192Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z192')[1].checked;
					if ( test1 == true) {
						ch2 += "192N";
					}
					else {
						ch2 += "192X";
					}
				}
			}
			var test = document.getElementsByName('z193')[0].checked;
			if (test == true) {
				ch2 += "193Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z193')[1].checked;
					if ( test1 == true) {
						ch2 += "193N";
					}
					else {
						ch2 += "193X";
					}
				}
			}
			var test = document.getElementsByName('z194')[0].checked;
			if (test == true) {
				ch2 += "194Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z194')[1].checked;
					if ( test1 == true) {
						ch2 += "194N";
					}
					else {
						ch2 += "194X";
					}
				}
			}
			var test = document.getElementsByName('z195')[0].checked;
			if (test == true) {
				ch2 += "195Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z195')[1].checked;
					if ( test1 == true) {
						ch2 += "195N";
					}
					else {
						ch2 += "195X";
					}
				}
			}
			var test = document.getElementsByName('z196')[0].checked;
			if (test == true) {
				ch2 += "196Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z196')[1].checked;
					if ( test1 == true) {
						ch2 += "196N";
					}
					else {
						ch2 += "196X";
					}
				}
			}
			var test = document.getElementsByName('z197')[0].checked;
			if (test == true) {
				ch2 += "197Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z197')[1].checked;
					if ( test1 == true) {
						ch2 += "197N";
					}
					else {
						ch2 += "197X";
					}
				}
			}
			var test = document.getElementsByName('z198')[0].checked;
			if (test == true) {
				ch2 += "198Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z198')[1].checked;
					if ( test1 == true) {
						ch2 += "198N";
					}
					else {
						ch2 += "198X";
					}
				}
			}
			var test = document.getElementsByName('z199')[0].checked;
			if (test == true) {
				ch2 += "199Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z199')[1].checked;
					if ( test1 == true) {
						ch2 += "199N";
					}
					else {
						ch2 += "199X";
					}
				}
			}
			
			var test = document.getElementsByName('z200')[0].checked;
			if (test == true) {
				ch3 += "200Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z200')[1].checked;
					if ( test1 == true) {
						ch3 += "200N";
					}
					else {
						ch3 += "200X";
					}
				}
			}
			var test = document.getElementsByName('z201')[0].checked;
			if (test == true) {
				ch3 += "201Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z201')[1].checked;
					if ( test1 == true) {
						ch3 += "201N";
					}
					else {
						ch3 += "201X";
					}
				}
			}
			var test = document.getElementsByName('z202')[0].checked;
			if (test == true) {
				ch3 += "202Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z202')[1].checked;
					if ( test1 == true) {
						ch3 += "202N";
					}
					else {
						ch3 += "202X";
					}
				}
			}
			var test = document.getElementsByName('z203')[0].checked;
			if (test == true) {
				ch3 += "203Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z203')[1].checked;
					if ( test1 == true) {
						ch3 += "203N";
					}
					else {
						ch3 += "203X";
					}
				}
			}
			var test = document.getElementsByName('z204')[0].checked;
			if (test == true) {
				ch3 += "204Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z204')[1].checked;
					if ( test1 == true) {
						ch3 += "204N";
					}
					else {
						ch3 += "204X";
					}
				}
			}
			var test = document.getElementsByName('z205')[0].checked;
			if (test == true) {
				ch3 += "205Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z205')[1].checked;
					if ( test1 == true) {
						ch3 += "205N";
					}
					else {
						ch3 += "205X";
					}
				}
			}
			var test = document.getElementsByName('z206')[0].checked;
			if (test == true) {
				ch3 += "206Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z206')[1].checked;
					if ( test1 == true) {
						ch3 += "206N";
					}
					else {
						ch3 += "206X";
					}
				}
			}
			var test = document.getElementsByName('z207')[0].checked;
			if (test == true) {
				ch3 += "207Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z207')[1].checked;
					if ( test1 == true) {
						ch3 += "207N";
					}
					else {
						ch3 += "207X";
					}
				}
			}
			var test = document.getElementsByName('z208')[0].checked;
			if (test == true) {
				ch3 += "208Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z208')[1].checked;
					if ( test1 == true) {
						ch3 += "208N";
					}
					else {
						ch3 += "208X";
					}
				}
			}
			var test = document.getElementsByName('z209')[0].checked;
			if (test == true) {
				ch3 += "209Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z209')[1].checked;
					if ( test1 == true) {
						ch3 += "209N";
					}
					else {
						ch3 += "209X";
					}
				}
			}

			$.ajax({
		        url: 'updateGenePrepFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePrepFinalsB_geneName").val(),
		        	type: $("#updateGenePrepFinalsB_type").val(),
		        	date1: $("#updateGenePrepFinalsB_date1").val(),
		        	date2: $("#updateGenePrepFinalsB_date2").val(),
		        	date3: $("#updateGenePrepFinalsB_date3").val(),
		        	comments: $("#updateGenePrepFinalsB_comments").val(),
		        	checked1: ch1,
		        	checked2: ch2,
		        	checked3: ch3
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Genomic Prep from finals form has been saved!");
		            //$('#colonyPCRADiv').show();
					//$('#colonyPCRADiv').html(data);	       
		        }
		    });  
		};
		
		
		
		var viewWPCRFinalsB = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneWPCRFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneWPCRFinalsB_geneName").val(),
		        	type: $("#viewGeneWPCRFinalsB_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#geneWPCRFinalsBDiv').show();
					$('#geneWPCRFinalsBDiv').html(data);	       
		        }
		    });  
		};
		
		var updateWPCRFinalsB = function(){
			
		    $.ajax({
		        url: 'updateGeneWPCRFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneWPCRFinalsB_geneName").val(),
		        	recordDate: $("#updateGeneWPCRFinalsB_recordDate").val(),
		        	pno1: $("#updateGeneWPCRFinalsB_pno1").val(),
		        	pno2: $("#updateGeneWPCRFinalsB_pno2").val(),
		        	exsize: $("#updateGeneWPCRFinalsB_exsize").val(),
		        	strain: $("#updateGeneWPCRFinalsB_strain").val(),
		        	comments: $("#updateGeneWPCRFinalsB_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The W PCR from finals form has been saved!");       
		        }
		    });  
		};
		
		
		var viewTS559C = function(){
			//alert("This is view ColonyB");//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneTS559.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneTS559C_geneName").val(),
		        	type: $("#viewGeneTS559C_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#ts559CDiv').show();
					$('#ts559CDiv').html(data);	       
		        }
		    });  
		};
		
		var updateTS559C = function(){
			var d = $("#updateGeneTS559C_recordDate").val();
			var c = $("#updateGeneTS559C_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
			//alert(1);//should be here
		    $.ajax({
		        url: 'updateGeneTS559.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneTS559C_geneName").val(),
		        	type: $("#updateGeneTS559C_type").val(),
		        	recordDate: $("#updateGeneTS559C_recordDate").val(),
		        	comments: $("#updateGeneTS559C_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The C to TS559 form have been saved!");      
		        }
		    });  
		};
		
		var viewRespottedC = function(){
			  //alert(1);//should be here
				//var url = 'viewGeneColony.action'; //action relative path
			  // or use $.post
			    $.ajax({
			        url: 'viewGeneRespotted.action',
			        type: 'POST',
			        dataType: 'html',
			        data :{
			        	geneName:$("#viewGeneRespottedC_geneName").val(),
			        	type: $("#viewGeneRespottedC_type").val()
			        	},
			        timeout: 1000,
			        error: function(){
			            alert('Error loading file');
			        },
			        success: function(data){
			            // do something with xml
			        	//alert(2);
			            $('#geneRespottedCDiv').show();
						$('#geneRespottedCDiv').html(data);	       
			        }
			    });  
			};
		var updateRespottedC = function(){
			var d = $("#updateGeneRespottedC_recordDate").val();
			var c = $("#updateGeneRespottedC_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
			//alert(1);//should be here
			   $.ajax({
			       url: 'updateGeneRespotted.action',
			       type: 'POST',
			       dataType: 'html',
     		       data :{
	            	geneName:$("#updateGeneRespottedC_geneName").val(),
		        	type: $("#updateGeneRespottedC_type").val(),
			        	recordDate: $("#updateGeneRespottedC_recordDate").val(),
			        	comments: $("#updateGeneRespottedC_comments").val()
			        	},
			        timeout: 1000,
			        error: function(){
			            alert('Error loading file');
			        },
			        success: function(data){
			            // do something with xml
			        	alert("The C Respotted form have been saved!");      
		        }
		    });  
		};
		
		var viewPrepIntermediatesC = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePrepIntermediates.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePrepIntermediatesC_geneName").val(),
		        	type: $("#viewGenePrepIntermediatesC_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePrepIntermediatesCDiv').show();
					$('#genePrepIntermediatesCDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePrepIntermeidatesC = function(){
			//alert(1);//should be here
		  // or use $.post
			var ch1 = "";
			var ch2 = "";
			
			test = document.getElementsByName('x210')[0].checked;
			if (test == true) {
				ch1 += "210Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x210')[1].checked;
					if ( test1 == true) {
						ch1 += "210N";
					}
					else {
						ch1 += "210X";
					}
				}
			}
			test = document.getElementsByName('y210')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y210')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z210')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z210')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x211')[0].checked;
			if (test == true) {
				ch1 += "211Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x211')[1].checked;
					if ( test1 == true) {
						ch1 += "211N";
					}
					else {
						ch1 += "211X";
					}
				}
			}
			test = document.getElementsByName('y211')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y211')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z211')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z211')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x212')[0].checked;
			if (test == true) {
				ch1 += "212Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x212')[1].checked;
					if ( test1 == true) {
						ch1 += "212N";
					}
					else {
						ch1 += "212X";
					}
				}
			}
			test = document.getElementsByName('y212')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y212')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z212')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z212')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x213')[0].checked;
			if (test == true) {
				ch1 += "213Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x213')[1].checked;
					if ( test1 == true) {
						ch1 += "213N";
					}
					else {
						ch1 += "213X";
					}
				}
			}
			test = document.getElementsByName('y213')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y213')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z213')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z213')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x214')[0].checked;
			if (test == true) {
				ch1 += "214Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x214')[1].checked;
					if ( test1 == true) {
						ch1 += "214N";
					}
					else {
						ch1 += "214X";
					}
				}
			}
			test = document.getElementsByName('y214')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y214')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z214')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z214')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x215')[0].checked;
			if (test == true) {
				ch1 += "215Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x215')[1].checked;
					if ( test1 == true) {
						ch1 += "215N";
					}
					else {
						ch1 += "215X";
					}
				}
			}
			test = document.getElementsByName('y215')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y215')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z215')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z215')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x216')[0].checked;
			if (test == true) {
				ch1 += "216Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x216')[1].checked;
					if ( test1 == true) {
						ch1 += "216N";
					}
					else {
						ch1 += "216X";
					}
				}
			}
			test = document.getElementsByName('y216')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y216')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z216')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z216')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x217')[0].checked;
			if (test == true) {
				ch1 += "217Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x217')[1].checked;
					if ( test1 == true) {
						ch1 += "217N";
					}
					else {
						ch1 += "217X";
					}
				}
			}
			test = document.getElementsByName('y217')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y217')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z217')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z217')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x218')[0].checked;
			if (test == true) {
				ch1 += "218Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x218')[1].checked;
					if ( test1 == true) {
						ch1 += "218N";
					}
					else {
						ch1 += "218X";
					}
				}
			}
			test = document.getElementsByName('y218')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y218')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z218')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z218')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x219')[0].checked;
			if (test == true) {
				ch1 += "219Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x219')[1].checked;
					if ( test1 == true) {
						ch1 += "219N";
					}
					else {
						ch1 += "219X";
					}
				}
			}
			test = document.getElementsByName('y219')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y219')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z219')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z219')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x220')[0].checked;
			if (test == true) {
				ch2 += "220Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x220')[1].checked;
					if ( test1 == true) {
						ch2 += "220N";
					}
					else {
						ch2 += "220X";
					}
				}
			}
			test = document.getElementsByName('y220')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y220')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z220')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z220')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x221')[0].checked;
			if (test == true) {
				ch2 += "221Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x221')[1].checked;
					if ( test1 == true) {
						ch2 += "221N";
					}
					else {
						ch2 += "221X";
					}
				}
			}
			test = document.getElementsByName('y221')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y221')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z221')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z221')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x222')[0].checked;
			if (test == true) {
				ch2 += "222Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x222')[1].checked;
					if ( test1 == true) {
						ch2 += "222N";
					}
					else {
						ch2 += "222X";
					}
				}
			}
			test = document.getElementsByName('y222')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y222')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z222')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z222')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x223')[0].checked;
			if (test == true) {
				ch2 += "223Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x223')[1].checked;
					if ( test1 == true) {
						ch2 += "223N";
					}
					else {
						ch2 += "223X";
					}
				}
			}
			test = document.getElementsByName('y223')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y223')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z223')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z223')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x224')[0].checked;
			if (test == true) {
				ch2 += "224Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x224')[1].checked;
					if ( test1 == true) {
						ch2 += "224N";
					}
					else {
						ch2 += "224X";
					}
				}
			}
			test = document.getElementsByName('y224')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y224')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z224')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z224')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x225')[0].checked;
			if (test == true) {
				ch2 += "225Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x225')[1].checked;
					if ( test1 == true) {
						ch2 += "225N";
					}
					else {
						ch2 += "225X";
					}
				}
			}
			test = document.getElementsByName('y225')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y225')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z225')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z225')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x226')[0].checked;
			if (test == true) {
				ch2 += "226Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x226')[1].checked;
					if ( test1 == true) {
						ch2 += "226N";
					}
					else {
						ch2 += "226X";
					}
				}
			}
			test = document.getElementsByName('y226')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y226')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z226')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z226')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x227')[0].checked;
			if (test == true) {
				ch2 += "227Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x227')[1].checked;
					if ( test1 == true) {
						ch2 += "227N";
					}
					else {
						ch2 += "227X";
					}
				}
			}
			test = document.getElementsByName('y227')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y227')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z227')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z227')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x228')[0].checked;
			if (test == true) {
				ch2 += "228Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x228')[1].checked;
					if ( test1 == true) {
						ch2 += "228N";
					}
					else {
						ch2 += "228X";
					}
				}
			}
			test = document.getElementsByName('y228')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y228')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z228')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z228')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x229')[0].checked;
			if (test == true) {
				ch2 += "229Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x229')[1].checked;
					if ( test1 == true) {
						ch2 += "229N";
					}
					else {
						ch2 += "229X";
					}
				}
			}
			test = document.getElementsByName('y229')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y229')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z229')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z229')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}

			$.ajax({
		        url: 'updateGenePrepIntermediates.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePrepIntermeidatesC_geneName").val(),
		        	type: $("#updateGenePrepIntermeidatesC_type").val(),
		        	date1: $("#updateGenePrepIntermeidatesC_date1").val(),
		        	date2: $("#updateGenePrepIntermeidatesC_date2").val(),
		        	x1: $("#updateGenePrepIntermeidatesC_x1").val(),
		        	x2:$("#updateGenePrepIntermeidatesC_x2").val(),
		        	y1: $("#updateGenePrepIntermeidatesC_y1").val(),
		        	y2:$("#updateGenePrepIntermeidatesC_y2").val(),
		        	z1: $("#updateGenePrepIntermeidatesC_z1").val(),
		        	z2:$("#updateGenePrepIntermeidatesC_z2").val(),
		        	pcrX1:$("#updateGenePrepIntermeidatesC_pcrX1").val(),
		        	pcrY1:$("#updateGenePrepIntermeidatesC_pcrY1").val(),
		        	pcrX2:$("#updateGenePrepIntermeidatesC_pcrX2").val(),
		        	pcrY2:$("#updateGenePrepIntermeidatesC_pcrY2").val(),
		        	checked: ch1,
		        	repeatChecked: ch2
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Prep from Intermediates (C) form have been saved!");      
		        }
		    });  
		};
		
		var viewPlate6MPC = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePlate6MP.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePlate6MPC_geneName").val(),
		        	type: $("#viewGenePlate6MPC_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePlate6MPCDiv').show();
					$('#genePlate6MPCDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePlate6MPC = function(){
			//alert(1);//should be here
			var test = document.getElementById('updateGenePlate6MPC_intermediate1').checked;
			var rs = null;
			if (test == true) {
				rs = "1";
			}
			if (rs == null) {
				var test1 = document.getElementById('updateGenePlate6MPC_intermediate2').checked;
				if ( test1 == true) {
					rs = "2";
				}
			}
		    $.ajax({
		        url: 'updateGenePlate6MP.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePlate6MPC_geneName").val(),
		        	type: $("#updateGenePlate6MPC_type").val(),
		        	recordDate: $("#updateGenePlate6MPC_recordDate").val(),
		        	strain: $("#updateGenePlate6MPC_strain").val(),
		        	intermediate: rs,
		        	comments: $("#updateGenePlate6MPC_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Plate 6 MP (C) form have been saved!");       
		        }
		    });  
		};
		
		var viewPrepFinalsC = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePrepFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePrepFinalsC_geneName").val(),
		        	type: $("#viewGenePrepFinalsC_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePrepFinalsCDiv').show();
					$('#genePrepFinalsCDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePrepFinalsC = function(){
			//alert(1);//should be here
		  // or use $.post
			var ch1 = ""; 
			var ch2 = "";
			var ch3 = "";
			
			var test = document.getElementsByName('z230')[0].checked;
			if (test == true) {
				ch1 += "230Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z230')[1].checked;
					if ( test1 == true) {
						ch1 += "230N";
					}
					else {
						ch1 += "230X";
					}
				}
			}
			var test = document.getElementsByName('z231')[0].checked;
			if (test == true) {
				ch1 += "231Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z231')[1].checked;
					if ( test1 == true) {
						ch1 += "231N";
					}
					else {
						ch1 += "231X";
					}
				}
			}
			var test = document.getElementsByName('z232')[0].checked;
			if (test == true) {
				ch1 += "232Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z232')[1].checked;
					if ( test1 == true) {
						ch1 += "232N";
					}
					else {
						ch1 += "232X";
					}
				}
			}
			var test = document.getElementsByName('z233')[0].checked;
			if (test == true) {
				ch1 += "233Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z233')[1].checked;
					if ( test1 == true) {
						ch1 += "233N";
					}
					else {
						ch1 += "233X";
					}
				}
			}
			var test = document.getElementsByName('z234')[0].checked;
			if (test == true) {
				ch1 += "234Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z234')[1].checked;
					if ( test1 == true) {
						ch1 += "234N";
					}
					else {
						ch1 += "234X";
					}
				}
			}
			var test = document.getElementsByName('z235')[0].checked;
			if (test == true) {
				ch1 += "235Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z235')[1].checked;
					if ( test1 == true) {
						ch1 += "235N";
					}
					else {
						ch1 += "235X";
					}
				}
			}
			var test = document.getElementsByName('z236')[0].checked;
			if (test == true) {
				ch1 += "236Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z236')[1].checked;
					if ( test1 == true) {
						ch1 += "236N";
					}
					else {
						ch1 += "236X";
					}
				}
			}
			var test = document.getElementsByName('z237')[0].checked;
			if (test == true) {
				ch1 += "237Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z237')[1].checked;
					if ( test1 == true) {
						ch1 += "237N";
					}
					else {
						ch1 += "237X";
					}
				}
			}
			var test = document.getElementsByName('z238')[0].checked;
			if (test == true) {
				ch1 += "238Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z238')[1].checked;
					if ( test1 == true) {
						ch1 += "238N";
					}
					else {
						ch1 += "238X";
					}
				}
			}
			var test = document.getElementsByName('z239')[0].checked;
			if (test == true) {
				ch1 += "239Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z239')[1].checked;
					if ( test1 == true) {
						ch1 += "239N";
					}
					else {
						ch1 += "239X";
					}
				}
			}
			
			var test = document.getElementsByName('z240')[0].checked;
			if (test == true) {
				ch2 += "240Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z240')[1].checked;
					if ( test1 == true) {
						ch2 += "240N";
					}
					else {
						ch2 += "240X";
					}
				}
			}
			var test = document.getElementsByName('z241')[0].checked;
			if (test == true) {
				ch2 += "241Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z241')[1].checked;
					if ( test1 == true) {
						ch2 += "241N";
					}
					else {
						ch2 += "241X";
					}
				}
			}
			var test = document.getElementsByName('z242')[0].checked;
			if (test == true) {
				ch2 += "242Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z242')[1].checked;
					if ( test1 == true) {
						ch2 += "242N";
					}
					else {
						ch2 += "242X";
					}
				}
			}
			var test = document.getElementsByName('z243')[0].checked;
			if (test == true) {
				ch2 += "243Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z243')[1].checked;
					if ( test1 == true) {
						ch2 += "243N";
					}
					else {
						ch2 += "243X";
					}
				}
			}
			var test = document.getElementsByName('z244')[0].checked;
			if (test == true) {
				ch2 += "244Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z244')[1].checked;
					if ( test1 == true) {
						ch2 += "244N";
					}
					else {
						ch2 += "244X";
					}
				}
			}
			var test = document.getElementsByName('z245')[0].checked;
			if (test == true) {
				ch2 += "245Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z245')[1].checked;
					if ( test1 == true) {
						ch2 += "245N";
					}
					else {
						ch2 += "245X";
					}
				}
			}
			var test = document.getElementsByName('z246')[0].checked;
			if (test == true) {
				ch2 += "246Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z246')[1].checked;
					if ( test1 == true) {
						ch2 += "246N";
					}
					else {
						ch2 += "246X";
					}
				}
			}
			var test = document.getElementsByName('z247')[0].checked;
			if (test == true) {
				ch2 += "247Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z247')[1].checked;
					if ( test1 == true) {
						ch2 += "247N";
					}
					else {
						ch2 += "247X";
					}
				}
			}
			var test = document.getElementsByName('z248')[0].checked;
			if (test == true) {
				ch2 += "248Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z248')[1].checked;
					if ( test1 == true) {
						ch2 += "248N";
					}
					else {
						ch2 += "248X";
					}
				}
			}
			var test = document.getElementsByName('z249')[0].checked;
			if (test == true) {
				ch2 += "249Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z249')[1].checked;
					if ( test1 == true) {
						ch2 += "249N";
					}
					else {
						ch2 += "249X";
					}
				}
			}
			
			var test = document.getElementsByName('z250')[0].checked;
			if (test == true) {
				ch3 += "250Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z250')[1].checked;
					if ( test1 == true) {
						ch3 += "250N";
					}
					else {
						ch3 += "250X";
					}
				}
			}
			var test = document.getElementsByName('z251')[0].checked;
			if (test == true) {
				ch3 += "251Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z251')[1].checked;
					if ( test1 == true) {
						ch3 += "251N";
					}
					else {
						ch3 += "251X";
					}
				}
			}
			var test = document.getElementsByName('z252')[0].checked;
			if (test == true) {
				ch3 += "252Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z252')[1].checked;
					if ( test1 == true) {
						ch3 += "252N";
					}
					else {
						ch3 += "252X";
					}
				}
			}
			var test = document.getElementsByName('z253')[0].checked;
			if (test == true) {
				ch3 += "253Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z253')[1].checked;
					if ( test1 == true) {
						ch3 += "253N";
					}
					else {
						ch3 += "253X";
					}
				}
			}
			var test = document.getElementsByName('z254')[0].checked;
			if (test == true) {
				ch3 += "254Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z254')[1].checked;
					if ( test1 == true) {
						ch3 += "254N";
					}
					else {
						ch3 += "254X";
					}
				}
			}
			var test = document.getElementsByName('z255')[0].checked;
			if (test == true) {
				ch3 += "255Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z255')[1].checked;
					if ( test1 == true) {
						ch3 += "255N";
					}
					else {
						ch3 += "255X";
					}
				}
			}
			var test = document.getElementsByName('z256')[0].checked;
			if (test == true) {
				ch3 += "256Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z256')[1].checked;
					if ( test1 == true) {
						ch3 += "256N";
					}
					else {
						ch3 += "256X";
					}
				}
			}
			var test = document.getElementsByName('z257')[0].checked;
			if (test == true) {
				ch3 += "257Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z257')[1].checked;
					if ( test1 == true) {
						ch3 += "257N";
					}
					else {
						ch3 += "257X";
					}
				}
			}
			var test = document.getElementsByName('z258')[0].checked;
			if (test == true) {
				ch3 += "258Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z258')[1].checked;
					if ( test1 == true) {
						ch3 += "258N";
					}
					else {
						ch3 += "258X";
					}
				}
			}
			var test = document.getElementsByName('z259')[0].checked;
			if (test == true) {
				ch3 += "259Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z259')[1].checked;
					if ( test1 == true) {
						ch3 += "259N";
					}
					else {
						ch3 += "259X";
					}
				}
			}

			$.ajax({
		        url: 'updateGenePrepFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePrepFinalsC_geneName").val(),
		        	type: $("#updateGenePrepFinalsC_type").val(),
		        	date1: $("#updateGenePrepFinalsC_date1").val(),
		        	date2: $("#updateGenePrepFinalsC_date2").val(),
		        	date3: $("#updateGenePrepFinalsC_date3").val(),
		        	pcr1: $("#updateGenePrepFinalsC_pcr1").val(),
		        	pcr2: $("#updateGenePrepFinalsC_pcr2").val(),
		        	exsize1: $("#updateGenePrepFinalsC_exsize1").val(),
		        	exsize2: $("#updateGenePrepFinalsC_exsize2").val(),
		        	comments: $("#updateGenePrepFinalsC_comments").val(),
		        	checked1: ch1,
		        	checked2: ch2,
		        	checked3: ch3
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Genomic Prep from finals form has been saved!");
		            //$('#colonyPCRADiv').show();
					//$('#colonyPCRADiv').html(data);	       
		        }
		    });  
		};
		
		var viewAmpliconPCRC = function(){
			//alert("This is view MinipreA");//should be here
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneAmpliconPCR.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneAmpliconPCRC_geneName").val(),
		        	type: $("#viewGeneAmpliconPCRC_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#geneAmpliconPCRCDiv').show();
					$('#geneAmpliconPCRCDiv').html(data);	       
		        }
		    });  
		};
		
		var updateAmpliconPCRC = function(){
			//alert(1);//should be here
			var test = document.getElementById('updateGeneAmpliconPCRC_seqConfirmedYes').checked;
			var rs = null;
			if (test == true) {
				rs = "Yes";
			}
			if (rs == null) {
				var test1 = document.getElementById('updateGeneAmpliconPCRC_seqConfirmedNo').checked;
				if ( test1 == true) {
					rs = "No";
				}
			}
			
		    $.ajax({
		        url: 'updateGeneAmpliconPCR.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneAmpliconPCRC_geneName").val(),
		        	type: $("#updateGeneAmpliconPCRC_type").val(),
		        	recordDate: $("#updateGeneAmpliconPCRC_recordDate").val(),
		        	strain: $("#updateGeneAmpliconPCRC_strain").val(),
		        	exsize: $("#updateGeneAmpliconPCRC_exsize").val(),
		        	seqConfirmed: rs,
		        	comments: $("#updateGeneAmpliconPCRC_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Amplicon PCR (C) form has been saved!");
		            //$('#minipreADiv').show();
					//$('#minipreADiv').html(data);	       
		        }
		    });  
		};
		
		var viewTS559D = function(){
			//alert("This is view ColonyB");//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneTS559.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneTS559D_geneName").val(),
		        	type: $("#viewGeneTS559D_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#ts559DDiv').show();
					$('#ts559DDiv').html(data);	       
		        }
		    });  
		};
		
		var updateTS559D = function(){
			//alert(1);//should be here
			var d = $("#updateGeneTS559D_recordDate").val();
			var c = $("#updateGeneTS559D_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
		    $.ajax({
		        url: 'updateGeneTS559.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneTS559D_geneName").val(),
		        	type: $("#updateGeneTS559D_type").val(),
		        	recordDate: $("#updateGeneTS559D_recordDate").val(),
		        	comments: $("#updateGeneTS559D_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The C to TS559 form have been saved!");      
		        }
		    });  
		};
		
		var viewRespottedD = function(){
			  //alert(1);//should be here
				//var url = 'viewGeneColony.action'; //action relative path
			  // or use $.post
			    $.ajax({
			        url: 'viewGeneRespotted.action',
			        type: 'POST',
			        dataType: 'html',
			        data :{
			        	geneName:$("#viewGeneRespottedD_geneName").val(),
			        	type: $("#viewGeneRespottedD_type").val()
			        	},
			        timeout: 1000,
			        error: function(){
			            alert('Error loading file');
			        },
			        success: function(data){
			            // do something with xml
			        	//alert(2);
			            $('#geneRespottedDDiv').show();
						$('#geneRespottedDDiv').html(data);	       
			        }
			    });  
			};
		var updateRespottedD = function(){
			var d = $("#updateGeneRespottedD_recordDate").val();
			var c = $("#updateGeneRespottedD_comments").val();
			if (d == "") {
				alert("Please fill in the Date");
				return;
			}
			if (c.length > 999) {
				alert("Please limit the comment in 999 characters");
				return;
			}
			//alert(1);//should be here
			   $.ajax({
			       url: 'updateGeneRespotted.action',
			       type: 'POST',
			       dataType: 'html',
     		       data :{
	            	geneName:$("#updateGeneRespottedD_geneName").val(),
		        	type: $("#updateGeneRespottedD_type").val(),
			        	recordDate: $("#updateGeneRespottedD_recordDate").val(),
			        	comments: $("#updateGeneRespottedD_comments").val()
			        	},
			        timeout: 1000,
			        error: function(){
			            alert('Error loading file');
			        },
			        success: function(data){
			            // do something with xml
			        	alert("The C Respotted form have been saved!");      
		        }
		    });  
		};
		
		var viewPrepIntermediatesD = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePrepIntermediates.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePrepIntermediatesD_geneName").val(),
		        	type: $("#viewGenePrepIntermediatesD_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePrepIntermediatesDDiv').show();
					$('#genePrepIntermediatesDDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePrepIntermeidatesD = function(){
			//alert(1);//should be here
		  // or use $.post
			var ch1 = "";
			var ch2 = "";
			
			test = document.getElementsByName('x260')[0].checked;
			if (test == true) {
				ch1 += "260Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x260')[1].checked;
					if ( test1 == true) {
						ch1 += "260N";
					}
					else {
						ch1 += "260X";
					}
				}
			}
			test = document.getElementsByName('y260')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y260')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z260')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z260')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x261')[0].checked;
			if (test == true) {
				ch1 += "261Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x261')[1].checked;
					if ( test1 == true) {
						ch1 += "261N";
					}
					else {
						ch1 += "261X";
					}
				}
			}
			test = document.getElementsByName('y261')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y261')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z261')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z261')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x262')[0].checked;
			if (test == true) {
				ch1 += "262Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x262')[1].checked;
					if ( test1 == true) {
						ch1 += "262N";
					}
					else {
						ch1 += "262X";
					}
				}
			}
			test = document.getElementsByName('y262')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y262')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z262')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z262')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x263')[0].checked;
			if (test == true) {
				ch1 += "263Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x263')[1].checked;
					if ( test1 == true) {
						ch1 += "263N";
					}
					else {
						ch1 += "263X";
					}
				}
			}
			test = document.getElementsByName('y263')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y263')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z263')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z263')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x264')[0].checked;
			if (test == true) {
				ch1 += "264Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x264')[1].checked;
					if ( test1 == true) {
						ch1 += "264N";
					}
					else {
						ch1 += "264X";
					}
				}
			}
			test = document.getElementsByName('y264')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y264')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z264')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z264')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x265')[0].checked;
			if (test == true) {
				ch1 += "265Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x265')[1].checked;
					if ( test1 == true) {
						ch1 += "265N";
					}
					else {
						ch1 += "265X";
					}
				}
			}
			test = document.getElementsByName('y265')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y265')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z265')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z265')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x266')[0].checked;
			if (test == true) {
				ch1 += "266Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x266')[1].checked;
					if ( test1 == true) {
						ch1 += "266N";
					}
					else {
						ch1 += "266X";
					}
				}
			}
			test = document.getElementsByName('y266')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y266')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z266')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z266')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x267')[0].checked;
			if (test == true) {
				ch1 += "267Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x267')[1].checked;
					if ( test1 == true) {
						ch1 += "267N";
					}
					else {
						ch1 += "267X";
					}
				}
			}
			test = document.getElementsByName('y267')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y267')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z267')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z267')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x268')[0].checked;
			if (test == true) {
				ch1 += "268Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x268')[1].checked;
					if ( test1 == true) {
						ch1 += "268N";
					}
					else {
						ch1 += "268X";
					}
				}
			}
			test = document.getElementsByName('y268')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y268')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z268')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z268')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x269')[0].checked;
			if (test == true) {
				ch1 += "269Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x269')[1].checked;
					if ( test1 == true) {
						ch1 += "269N";
					}
					else {
						ch1 += "269X";
					}
				}
			}
			test = document.getElementsByName('y269')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y269')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			test = document.getElementsByName('z269')[0].checked;
			if (test == true) {
				ch1 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z269')[1].checked;
					if ( test1 == true) {
						ch1 += "N";
					}
					else {
						ch1 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x270')[0].checked;
			if (test == true) {
				ch2 += "270Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x270')[1].checked;
					if ( test1 == true) {
						ch2 += "270N";
					}
					else {
						ch2 += "270X";
					}
				}
			}
			test = document.getElementsByName('y270')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y270')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z270')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z270')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x271')[0].checked;
			if (test == true) {
				ch2 += "271Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x271')[1].checked;
					if ( test1 == true) {
						ch2 += "271N";
					}
					else {
						ch2 += "271X";
					}
				}
			}
			test = document.getElementsByName('y271')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y271')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z271')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z271')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x272')[0].checked;
			if (test == true) {
				ch2 += "272Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x272')[1].checked;
					if ( test1 == true) {
						ch2 += "272N";
					}
					else {
						ch2 += "272X";
					}
				}
			}
			test = document.getElementsByName('y272')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y272')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z272')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z272')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x273')[0].checked;
			if (test == true) {
				ch2 += "273Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x273')[1].checked;
					if ( test1 == true) {
						ch2 += "273N";
					}
					else {
						ch2 += "273X";
					}
				}
			}
			test = document.getElementsByName('y273')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y273')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z273')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z273')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x274')[0].checked;
			if (test == true) {
				ch2 += "274Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x274')[1].checked;
					if ( test1 == true) {
						ch2 += "274N";
					}
					else {
						ch2 += "274X";
					}
				}
			}
			test = document.getElementsByName('y274')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y274')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z274')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z274')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x275')[0].checked;
			if (test == true) {
				ch2 += "275Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x275')[1].checked;
					if ( test1 == true) {
						ch2 += "275N";
					}
					else {
						ch2 += "275X";
					}
				}
			}
			test = document.getElementsByName('y275')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y275')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z275')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z275')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x276')[0].checked;
			if (test == true) {
				ch2 += "276Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x276')[1].checked;
					if ( test1 == true) {
						ch2 += "276N";
					}
					else {
						ch2 += "276X";
					}
				}
			}
			test = document.getElementsByName('y276')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y276')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z276')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z276')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x277')[0].checked;
			if (test == true) {
				ch2 += "277Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x277')[1].checked;
					if ( test1 == true) {
						ch2 += "277N";
					}
					else {
						ch2 += "277X";
					}
				}
			}
			test = document.getElementsByName('y277')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y277')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z277')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z277')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x278')[0].checked;
			if (test == true) {
				ch2 += "278Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x278')[1].checked;
					if ( test1 == true) {
						ch2 += "278N";
					}
					else {
						ch2 += "278X";
					}
				}
			}
			test = document.getElementsByName('y278')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y278')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z278')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z278')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			
			test = document.getElementsByName('x279')[0].checked;
			if (test == true) {
				ch2 += "279Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('x279')[1].checked;
					if ( test1 == true) {
						ch2 += "279N";
					}
					else {
						ch2 += "279X";
					}
				}
			}
			test = document.getElementsByName('y279')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('y279')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}
			test = document.getElementsByName('z279')[0].checked;
			if (test == true) {
				ch2 += "Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z279')[1].checked;
					if ( test1 == true) {
						ch2 += "N";
					}
					else {
						ch2 += "X";
					}
				}
			}

			$.ajax({
		        url: 'updateGenePrepIntermediates.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePrepIntermeidatesD_geneName").val(),
		        	type: $("#updateGenePrepIntermeidatesD_type").val(),
		        	date1: $("#updateGenePrepIntermeidatesD_date1").val(),
		        	date2: $("#updateGenePrepIntermeidatesD_date2").val(),
		        	x1: $("#updateGenePrepIntermeidatesD_x1").val(),
		        	x2:$("#updateGenePrepIntermeidatesD_x2").val(),
		        	y1: $("#updateGenePrepIntermeidatesD_y1").val(),
		        	y2:$("#updateGenePrepIntermeidatesD_y2").val(),
		        	z1: $("#updateGenePrepIntermeidatesD_z1").val(),
		        	z2:$("#updateGenePrepIntermeidatesD_z2").val(),
		        	pcrX1:$("#updateGenePrepIntermeidatesD_pcrX1").val(),
		        	pcrY1:$("#updateGenePrepIntermeidatesD_pcrY1").val(),
		        	pcrX2:$("#updateGenePrepIntermeidatesD_pcrX2").val(),
		        	pcrY2:$("#updateGenePrepIntermeidatesD_pcrY2").val(),
		        	checked: ch1,
		        	repeatChecked: ch2
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Prep from Intermediates (D) form have been saved!");      
		        }
		    });  
		};
		
		var viewPlate6MPD = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePlate6MP.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePlate6MPD_geneName").val(),
		        	type: $("#viewGenePlate6MPD_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePlate6MPDDiv').show();
					$('#genePlate6MPDDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePlate6MPD = function(){
			//alert(1);//should be here
			var test = document.getElementById('updateGenePlate6MPD_intermediate1').checked;
			var rs = null;
			if (test == true) {
				rs = "1";
			}
			if (rs == null) {
				var test1 = document.getElementById('updateGenePlate6MPD_intermediate2').checked;
				if ( test1 == true) {
					rs = "2";
				}
			}
		    $.ajax({
		        url: 'updateGenePlate6MP.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePlate6MPD_geneName").val(),
		        	type: $("#updateGenePlate6MPD_type").val(),
		        	recordDate: $("#updateGenePlate6MPD_recordDate").val(),
		        	strain: $("#updateGenePlate6MPD_strain").val(),
		        	intermediate: rs,
		        	comments: $("#updateGenePlate6MPD_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Plate 6 MP (D) form have been saved!");       
		        }
		    });  
		};
		
		var viewPrepFinalsD = function(){
		    //alert(1);//should be here
			//var url = 'viewGeneColony.action'; //action relative path
		  // or use $.post
		    $.ajax({
		        url: 'viewGenePrepFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGenePrepFinalsD_geneName").val(),
		        	type: $("#viewGenePrepFinalsD_type").val()
		        	},
		        timeout: 5000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#genePrepFinalsDDiv').show();
					$('#genePrepFinalsDDiv').html(data);	       
		        }
		    });  
		};
		
		var updatePrepFinalsD = function(){
			//alert(1);//should be here
		  // or use $.post
			var ch1 = ""; 
			var ch2 = "";
			var ch3 = "";
			
			var test = document.getElementsByName('z280')[0].checked;
			if (test == true) {
				ch1 += "280Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z280')[1].checked;
					if ( test1 == true) {
						ch1 += "280N";
					}
					else {
						ch1 += "280X";
					}
				}
			}
			var test = document.getElementsByName('z281')[0].checked;
			if (test == true) {
				ch1 += "281Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z281')[1].checked;
					if ( test1 == true) {
						ch1 += "281N";
					}
					else {
						ch1 += "281X";
					}
				}
			}
			var test = document.getElementsByName('z282')[0].checked;
			if (test == true) {
				ch1 += "282Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z282')[1].checked;
					if ( test1 == true) {
						ch1 += "282N";
					}
					else {
						ch1 += "282X";
					}
				}
			}
			var test = document.getElementsByName('z283')[0].checked;
			if (test == true) {
				ch1 += "283Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z283')[1].checked;
					if ( test1 == true) {
						ch1 += "283N";
					}
					else {
						ch1 += "283X";
					}
				}
			}
			var test = document.getElementsByName('z284')[0].checked;
			if (test == true) {
				ch1 += "284Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z284')[1].checked;
					if ( test1 == true) {
						ch1 += "284N";
					}
					else {
						ch1 += "284X";
					}
				}
			}
			var test = document.getElementsByName('z285')[0].checked;
			if (test == true) {
				ch1 += "285Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z285')[1].checked;
					if ( test1 == true) {
						ch1 += "285N";
					}
					else {
						ch1 += "285X";
					}
				}
			}
			var test = document.getElementsByName('z286')[0].checked;
			if (test == true) {
				ch1 += "286Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z286')[1].checked;
					if ( test1 == true) {
						ch1 += "286N";
					}
					else {
						ch1 += "286X";
					}
				}
			}
			var test = document.getElementsByName('z287')[0].checked;
			if (test == true) {
				ch1 += "287Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z287')[1].checked;
					if ( test1 == true) {
						ch1 += "287N";
					}
					else {
						ch1 += "287X";
					}
				}
			}
			var test = document.getElementsByName('z288')[0].checked;
			if (test == true) {
				ch1 += "288Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z288')[1].checked;
					if ( test1 == true) {
						ch1 += "288N";
					}
					else {
						ch1 += "288X";
					}
				}
			}
			var test = document.getElementsByName('z289')[0].checked;
			if (test == true) {
				ch1 += "289Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z289')[1].checked;
					if ( test1 == true) {
						ch1 += "289N";
					}
					else {
						ch1 += "289X";
					}
				}
			}
			
			var test = document.getElementsByName('z290')[0].checked;
			if (test == true) {
				ch2 += "290Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z290')[1].checked;
					if ( test1 == true) {
						ch2 += "290N";
					}
					else {
						ch2 += "290X";
					}
				}
			}
			var test = document.getElementsByName('z291')[0].checked;
			if (test == true) {
				ch2 += "291Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z291')[1].checked;
					if ( test1 == true) {
						ch2 += "291N";
					}
					else {
						ch2 += "291X";
					}
				}
			}
			var test = document.getElementsByName('z292')[0].checked;
			if (test == true) {
				ch2 += "292Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z292')[1].checked;
					if ( test1 == true) {
						ch2 += "292N";
					}
					else {
						ch2 += "292X";
					}
				}
			}
			var test = document.getElementsByName('z293')[0].checked;
			if (test == true) {
				ch2 += "293Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z293')[1].checked;
					if ( test1 == true) {
						ch2 += "293N";
					}
					else {
						ch2 += "293X";
					}
				}
			}
			var test = document.getElementsByName('z294')[0].checked;
			if (test == true) {
				ch2 += "294Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z294')[1].checked;
					if ( test1 == true) {
						ch2 += "294N";
					}
					else {
						ch2 += "294X";
					}
				}
			}
			var test = document.getElementsByName('z295')[0].checked;
			if (test == true) {
				ch2 += "295Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z295')[1].checked;
					if ( test1 == true) {
						ch2 += "295N";
					}
					else {
						ch2 += "295X";
					}
				}
			}
			var test = document.getElementsByName('z296')[0].checked;
			if (test == true) {
				ch2 += "296Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z296')[1].checked;
					if ( test1 == true) {
						ch2 += "296N";
					}
					else {
						ch2 += "296X";
					}
				}
			}
			var test = document.getElementsByName('z297')[0].checked;
			if (test == true) {
				ch2 += "297Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z297')[1].checked;
					if ( test1 == true) {
						ch2 += "297N";
					}
					else {
						ch2 += "297X";
					}
				}
			}
			var test = document.getElementsByName('z298')[0].checked;
			if (test == true) {
				ch2 += "298Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z298')[1].checked;
					if ( test1 == true) {
						ch2 += "298N";
					}
					else {
						ch2 += "298X";
					}
				}
			}
			var test = document.getElementsByName('z299')[0].checked;
			if (test == true) {
				ch2 += "299Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z299')[1].checked;
					if ( test1 == true) {
						ch2 += "299N";
					}
					else {
						ch2 += "299X";
					}
				}
			}
			
			var test = document.getElementsByName('z300')[0].checked;
			if (test == true) {
				ch3 += "300Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z300')[1].checked;
					if ( test1 == true) {
						ch3 += "300N";
					}
					else {
						ch3 += "300X";
					}
				}
			}
			var test = document.getElementsByName('z301')[0].checked;
			if (test == true) {
				ch3 += "301Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z301')[1].checked;
					if ( test1 == true) {
						ch3 += "301N";
					}
					else {
						ch3 += "301X";
					}
				}
			}
			var test = document.getElementsByName('z302')[0].checked;
			if (test == true) {
				ch3 += "302Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z302')[1].checked;
					if ( test1 == true) {
						ch3 += "302N";
					}
					else {
						ch3 += "302X";
					}
				}
			}
			var test = document.getElementsByName('z303')[0].checked;
			if (test == true) {
				ch3 += "303Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z303')[1].checked;
					if ( test1 == true) {
						ch3 += "303N";
					}
					else {
						ch3 += "303X";
					}
				}
			}
			var test = document.getElementsByName('z304')[0].checked;
			if (test == true) {
				ch3 += "304Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z304')[1].checked;
					if ( test1 == true) {
						ch3 += "304N";
					}
					else {
						ch3 += "304X";
					}
				}
			}
			var test = document.getElementsByName('z305')[0].checked;
			if (test == true) {
				ch3 += "305Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z305')[1].checked;
					if ( test1 == true) {
						ch3 += "305N";
					}
					else {
						ch3 += "305X";
					}
				}
			}
			var test = document.getElementsByName('z306')[0].checked;
			if (test == true) {
				ch3 += "306Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z306')[1].checked;
					if ( test1 == true) {
						ch3 += "306N";
					}
					else {
						ch3 += "306X";
					}
				}
			}
			var test = document.getElementsByName('z307')[0].checked;
			if (test == true) {
				ch3 += "307Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z307')[1].checked;
					if ( test1 == true) {
						ch3 += "307N";
					}
					else {
						ch3 += "307X";
					}
				}
			}
			var test = document.getElementsByName('z308')[0].checked;
			if (test == true) {
				ch3 += "308Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z308')[1].checked;
					if ( test1 == true) {
						ch3 += "308N";
					}
					else {
						ch3 += "308X";
					}
				}
			}
			var test = document.getElementsByName('z309')[0].checked;
			if (test == true) {
				ch3 += "309Y";
			}
			else {
				if (test == false) {
					var test1 = document.getElementsByName('z309')[1].checked;
					if ( test1 == true) {
						ch3 += "309N";
					}
					else {
						ch3 += "309X";
					}
				}
			}

			$.ajax({
		        url: 'updateGenePrepFinals.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGenePrepFinalsD_geneName").val(),
		        	type: $("#updateGenePrepFinalsD_type").val(),
		        	date1: $("#updateGenePrepFinalsD_date1").val(),
		        	date2: $("#updateGenePrepFinalsD_date2").val(),
		        	date3: $("#updateGenePrepFinalsD_date3").val(),
		        	pcr1: $("#updateGenePrepFinalsD_pcr1").val(),
		        	pcr2: $("#updateGenePrepFinalsD_pcr2").val(),
		        	exsize1: $("#updateGenePrepFinalsD_exsize1").val(),
		        	exsize2: $("#updateGenePrepFinalsD_exsize2").val(),
		        	comments: $("#updateGenePrepFinalsD_comments").val(),
		        	checked1: ch1,
		        	checked2: ch2,
		        	checked3: ch3
		        	},
		        timeout: 2000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Genomic Prep from finals form has been saved!");
		            //$('#colonyPCRADiv').show();
					//$('#colonyPCRADiv').html(data);	       
		        }
		    });  
		};
		
		var viewAmpliconPCRD = function(){
			//alert("This is view MinipreA");//should be here
		  // or use $.post
		    $.ajax({
		        url: 'viewGeneAmpliconPCR.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#viewGeneAmpliconPCRD_geneName").val(),
		        	type: $("#viewGeneAmpliconPCRD_type").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	//alert("The comment has been saved!");
		            $('#geneAmpliconPCRDDiv').show();
					$('#geneAmpliconPCRDDiv').html(data);	       
		        }
		    });  
		};
		
		var updateAmpliconPCRD = function(){
			//alert(1);//should be here
			var test = document.getElementById('updateGeneAmpliconPCRD_seqConfirmedYes').checked;
			var rs = null;
			if (test == true) {
				rs = "Yes";
			}
			if (rs == null) {
				var test1 = document.getElementById('updateGeneAmpliconPCRD_seqConfirmedNo').checked;
				if ( test1 == true) {
					rs = "No";
				}
			}
			
		    $.ajax({
		        url: 'updateGeneAmpliconPCR.action',
		        type: 'POST',
		        dataType: 'html',
		        data :{
		        	geneName:$("#updateGeneAmpliconPCRD_geneName").val(),
		        	type: $("#updateGeneAmpliconPCRD_type").val(),
		        	recordDate: $("#updateGeneAmpliconPCRD_recordDate").val(),
		        	strain: $("#updateGeneAmpliconPCRD_strain").val(),
		        	exsize: $("#updateGeneAmpliconPCRD_exsize").val(),
		        	seqConfirmed: rs,
		        	comments: $("#updateGeneAmpliconPCRD_comments").val()
		        	},
		        timeout: 1000,
		        error: function(){
		            alert('Error loading file');
		        },
		        success: function(data){
		            // do something with xml
		        	alert("The Amplicon PCR (D) form has been saved!");
		            //$('#minipreADiv').show();
					//$('#minipreADiv').html(data);	       
		        }
		    });  
		};

var searchImg = function(){
	//alert("This is view MinipreB");//should be here
	  // or use $.post
	$('#imageListDiv').hide();
	    $.ajax({
	        url: 'SearchImage.action',
	        type: 'POST',
	        dataType: 'html',
	        data :{
	        	geneName:$("#searchImage_geneName").val(),
	        	formName: $("#searchImage_formName").val()
	        	},
	        timeout: 5000,
	        error: function(){
	            alert('Error loading file');
	        },
	        success: function(data){
	            // do something with xml
	        	//alert("The comment has been saved!");
	            $('#imageListDiv').show();
				$('#imageListDiv').html(data);	       
	        }
	    });  
	};

 function deleteImg(id){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'DeleteImage.action',
        type: 'GET',
        dataType: 'html',
        data :{
        	id:id
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Image has been deleted!"); 
        	searchImg();
        	
        }
    });  
};

function deletePrimer(id, geneName){
	//alert(1);//should be here
	//var url = 'updateGeneComment.action'; //action relative path
  // or use $.post
    $.ajax({
        url: 'DeletePrimer.action',
        type: 'GET',
        dataType: 'html',
        data :{
        	geneName: geneName,
        	id:id
        	},
        timeout: 5000,
        error: function(){
            alert('Error loading file');
        },
        success: function(data){
            // do something with xml
        	alert("The Primer has been deleted!"); 
        	viewPrimerList();
        }
    });  
};


function addPrimer() {
	$('#insertSuccessDiv').hide();
	$('#insertErrorDiv').hide();
	g = $("#primerform_geneName").val();
	pr = $("#primerform_primer").val();
	pl = $("#primerform_plate").val();
	w = $("#primerform_well").val();
	s =  $("#primerform_sequence").val();
	if (g == ""||pr==""||pl==""||w==""||s==""){
		alert("please fill in all of the fields!");
		return;
	}
    $.ajax({
        url: 'AddPrimer.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#primerform_geneName").val(),
        	primer:$("#primerform_primer").val(),
        	plate:$("#primerform_plate").val(),
        	well:$("#primerform_well").val(),
        	sequence: $("#primerform_sequence").val()
        	},
        timeout: 5000,
        error: function(){
        	$('#insertErrorDiv').show();
        },
        success: function(data){
            // do something with xml
        	//alert("The comment has been saved!");
        	$('#insertSuccessDiv').show();
        	
        }
    });
};

function  viewPrimerList() {
	$.ajax({
        url: 'ViewPrimer.action',
        type: 'POST',
        dataType: 'html',
        data :{
        	geneName:$("#viewprimer_geneName").val()
        	},
        timeout: 5000,
        error: function(){
        	alert("Delete error!");
        },
        success: function(data){
            // do something with xml
        	$('#deletePrimerDiv').show();
        	$('#deletePrimerDiv').html(data);	
        }
    });
}



